|
Nested Class Summary | ||
static interface |
TypeConverter.Converter<F,T> Conversion interface |
|
protected class |
TypeConverter.DynamicTwoStageConverter<F,I,T> Support for chaining conversions |
|
static class |
TypeConverter.TwoStageConverter<F,I,T> Support for chaining conversions |
Constructor Summary | ||
TypeConverter() |
Method Summary | ||
<F,T> void |
addConverter(Class<F> source, Class<T> destination, TypeConverter.Converter<F,T> converter) Add a converter to the list of those available |
|
<F,I,T> TypeConverter.Converter<F,T> |
addDynamicTwoStageConverter(Class<F> source, Class<I> intermediate, Class<T> destination) Add a dynamic two stage converter |
|
boolean |
booleanValue(Object value) Get the boolean value for the value object May have conversion failure |
|
byte |
byteValue(Object value) Get the byte value for the value object May have conversion failure |
|
char |
charValue(Object value) Get the char value for the value object May have conversion failure |
|
<T> Collection<T> |
convert(Class<T> c, Collection<?> values) General conversion method to convert collection contents to the specified type. |
|
<T> T |
convert(Class<T> c, Object value) General conversion method to Object types (note it cannot support conversion to primary types due the restrictions of reflection. |
|
Collection<?> |
convert(DataTypeDefinition propertyType, Collection<?> values) General conversion method to convert collection contents to the specified type. |
|
convert(DataTypeDefinition propertyType, Object value) General conversion method to Object types (note it cannot support conversion to primary types due the restrictions of reflection. |
||
Collection<?> |
convert(DataTypeDefinition propertyType, Object[] values) General conversion method to convert collection contents to the specified type. |
|
double |
doubleValue(Object value) Get the bollean value for the value object May have conversion failure |
|
float |
floatValue(Object value) Get the bollean value for the value object May have conversion failure |
|
<T> Collection<T> |
getCollection(Class<T> c, Object value) Get a collection for the passed value converted to the specified type |
|
<F,T> TypeConverter.Converter<F,T> |
getConverter(Class<F> source, Class<T> dest) Find a conversion for a specific Class |
|
<T> TypeConverter.Converter<Object,T> |
getConverter(Object value, Class<T> dest) Find conversion for the specified object Note: Takes into account the class of the object and any interfaces it may also support. |
|
Map<Class<?>,Map<Class<?>,TypeConverter.Converter<?,?>>> |
getConverters() | |
int |
intValue(Object value) Get the int value for the value object May have conversion failure |
|
boolean |
isMultiValued(Object value) Is the value multi valued |
|
long |
longValue(Object value) Get the long value for the value object May have conversion failure |
|
short |
shortValue(Object value) Get the short value for the value object May have conversion failure |
|
int |
size(Object value) Get the number of values represented |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
|