|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.oddjob.arooa.convert.DefaultConverter
public class DefaultConverter
The Default ArooaConverter. This converter uses
a ConversionLookup to provide the
ConversionPath for the conversion. If none
is provided the DefaultConversionLookup is used.
| Constructor Summary | |
|---|---|
DefaultConverter()
|
|
DefaultConverter(ConversionLookup convertlets)
Only Constructor. |
|
| Method Summary | ||
|---|---|---|
|
convert(F from,
Class<T> required)
Perform a conversion. |
|
|
findConversion(Class<F> fromClass,
Class<T> required)
Find a conversion in the convertletRegistry. |
|
ConversionLookup |
getRegistry()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultConverter(ConversionLookup convertlets)
convertlets - A ConvertletRegistry.public DefaultConverter()
| Method Detail |
|---|
public ConversionLookup getRegistry()
public <F,T> T convert(F from,
Class<T> required)
throws NoConversionAvailableException,
ConversionFailedException
ArooaValue and it's not already
the required ArooaValue then perform a conversion using the best conversion
found from the provided ArooaConversionKit.
convert in interface ArooaConverterArooaConverter.convert(java.lang.Object, java.lang.Class)from - The Object to convert. May be null.required - The Class the object is to converted into.
NoConversionAvailableException - If ther is no conversion to
the required type.
ConversionFailedException - If applying the conversion failed.
public <F,T> ConversionPath<F,T> findConversion(Class<F> fromClass,
Class<T> required)
findConversion in interface ConversionLookupfromClass - Class to convert from.required - Class to convert to.
NoConversionAvailableException - If no conversion is available.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||