public class PropertyConverterManager extends Object
PropertyConverter
instances.
This class is thread-safe.Constructor and Description |
---|
PropertyConverterManager()
Constructor.
|
PropertyConverterManager(boolean init) |
Modifier and Type | Method and Description |
---|---|
protected <T> PropertyConverter<T> |
createDefaultPropertyConverter(TypeLiteral<T> targetType)
Creates a dynamic PropertyConverter for the given target type.
|
Map<TypeLiteral<?>,List<PropertyConverter<?>>> |
getPropertyConverters()
Get a map of all property converters currently registered.
|
<T> List<PropertyConverter<T>> |
getPropertyConverters(TypeLiteral<T> targetType)
Get the list of all current registered converters for the given target type.
|
protected void |
initConverters()
Registers the default converters provided out of the box.
|
boolean |
isTargetTypeSupported(TypeLiteral<?> targetType)
Allows to evaluate if a given target type is supported.
|
<T> void |
register(TypeLiteral<T> targetType,
PropertyConverter<T> converter)
Registers a ew converter instance.
|
public PropertyConverterManager()
public PropertyConverterManager(boolean init)
protected void initConverters()
public <T> void register(TypeLiteral<T> targetType, PropertyConverter<T> converter)
T
- the type.targetType
- the target type, not null.converter
- the converter, not null.public boolean isTargetTypeSupported(TypeLiteral<?> targetType)
targetType
- the target type, not null.public Map<TypeLiteral<?>,List<PropertyConverter<?>>> getPropertyConverters()
createDefaultPropertyConverter(org.apache.tamaya.TypeLiteral)
public <T> List<PropertyConverter<T>> getPropertyConverters(TypeLiteral<T> targetType)
T
- the type classtargetType
- the target type, not null.createDefaultPropertyConverter(org.apache.tamaya.TypeLiteral)
protected <T> PropertyConverter<T> createDefaultPropertyConverter(TypeLiteral<T> targetType)
T
- the type classtargetType
- the target typeCopyright © 2014–2015 Apache Software Foundation. All rights reserved.