public abstract class AbstractCSVToBean extends Object
Constructor and Description |
---|
AbstractCSVToBean() |
Modifier and Type | Method and Description |
---|---|
protected String |
checkForTrim(String s,
PropertyDescriptor prop)
Returns the trimmed value of the string only if the property the string
is describing should be trimmed to be converted to that type.
|
protected Object |
convertValue(String value,
PropertyDescriptor prop)
Convert a string value to its Object value.
|
protected abstract PropertyEditor |
getPropertyEditor(PropertyDescriptor desc)
Attempt to find custom property editor on descriptor first, else try the
propery editor manager.
|
protected PropertyEditor |
getPropertyEditorValue(Class<?> cls)
Returns the PropertyEditor for the given class.
|
protected abstract PropertyEditor getPropertyEditor(PropertyDescriptor desc) throws InstantiationException, IllegalAccessException
desc
- PropertyDescriptor.InstantiationException
- Thrown when getting the PropertyEditor for the class.IllegalAccessException
- Thrown when getting the PropertyEditor for the class.protected String checkForTrim(String s, PropertyDescriptor prop)
s
- String describing the value.prop
- Property descriptor of the value.protected Object convertValue(String value, PropertyDescriptor prop) throws InstantiationException, IllegalAccessException
value
- String valueprop
- PropertyDescriptorInstantiationException
- Thrown on error getting the property
editor from the property descriptor.IllegalAccessException
- Thrown on error getting the property
editor from the property descriptor.protected PropertyEditor getPropertyEditorValue(Class<?> cls)
cls
- The class for which the property editor is desiredCopyright © 2017. All rights reserved.