Package adams.flow.core
Class PropertyHelper
- java.lang.Object
-
- adams.flow.core.PropertyHelper
-
public class PropertyHelper extends Object
Helper class for updating properties of objects.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected static List<AbstractPropertyValueConverter>
m_Converters
the available converters.protected static AbstractPropertyValueConverter
m_DefaultConverter
the default converter.
-
Constructor Summary
Constructors Constructor Description PropertyHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
convertValue(PropertyPath.PropertyContainer cont, String value, MessageCollection errors)
Converts the value into the appropriate object, if possible.protected static Object
convertValue(Class cls, String value, MessageCollection errors)
Converts the string value into an object.protected static void
initialize()
Initializes the converter list.
-
-
-
Field Detail
-
m_Converters
protected static List<AbstractPropertyValueConverter> m_Converters
the available converters.
-
m_DefaultConverter
protected static AbstractPropertyValueConverter m_DefaultConverter
the default converter.
-
-
Method Detail
-
initialize
protected static void initialize()
Initializes the converter list.- See Also:
m_Converters
-
convertValue
protected static Object convertValue(Class cls, String value, MessageCollection errors)
Converts the string value into an object.- Parameters:
cls
- the requested classvalue
- the string representationerrors
- for collecting errors- Returns:
- the object or null if failed to convert
-
convertValue
public static Object convertValue(PropertyPath.PropertyContainer cont, String value, MessageCollection errors)
Converts the value into the appropriate object, if possible.- Parameters:
cont
- the property container to usevalue
- the string to convert- Returns:
- the converted value or null if it cannot be converted
-
-