public abstract class PropertyDataImporter extends Object
PropertyConverter
s.Modifier and Type | Field and Description |
---|---|
private Map<Class<?>,PropertyConverter<?>> |
converters
The converters to use as default for specific property classes.
|
private static Map<Class<?>,PropertyConverter<?>> |
DEFAULT_CONVERTERS
The default list of known converters for each class.
|
Constructor and Description |
---|
PropertyDataImporter() |
Modifier and Type | Method and Description |
---|---|
<T> void |
addConverter(Class<T> type,
PropertyConverter<T> converter)
Registers the converter to use for a specific type.
|
protected <T> PropertyConverter<T> |
findConverter(Class<T> propertyClass)
Finds the converter for the given type.
|
private static final Map<Class<?>,PropertyConverter<?>> DEFAULT_CONVERTERS
private final Map<Class<?>,PropertyConverter<?>> converters
public <T> void addConverter(Class<T> type, PropertyConverter<T> converter)
type
- the type of the propertyconverter
- used to convert that type from a String in the import file to a Java valueprotected <T> PropertyConverter<T> findConverter(Class<T> propertyClass)
propertyClass
- the type of the primitive property to convertnull
if none is foundCopyright © 2022 fastnate.org. All rights reserved.