Package org.oddjob.arooa.convert
Interface ArooaConverter
- All Superinterfaces:
ConversionLookup
- All Known Implementing Classes:
DefaultConverter,EmptyArooaConverter
Something that can provide conversions between objects of different types.
- Author:
- rob
-
Method Summary
Methods inherited from interface org.oddjob.arooa.convert.ConversionLookup
findConversion
-
Method Details
-
convert
<F,T> T convert(F from, Class<T> required) throws NoConversionAvailableException, ConversionFailedException Convert if possible from the given Object to an equivalent object of the given type.- Parameters:
from- The object to convert from.required- The class the object is required to convert to.- Returns:
- A value of the required class, or null.
- Throws:
NoConversionAvailableException- If there is no way to convert the given type to the required type.ConversionFailedException- If applying the conversion failed.
-