org.oddjob.arooa.convert
Class EmptyArooaConverter

java.lang.Object
  extended by org.oddjob.arooa.convert.EmptyArooaConverter
All Implemented Interfaces:
ArooaConverter, ConversionLookup

public class EmptyArooaConverter
extends Object
implements ArooaConverter


Constructor Summary
EmptyArooaConverter()
           
 
Method Summary
<F,T> T
convert(F from, Class<T> required)
          Convert if possible from the given Object to an equivalent object of the given type.
<F,T> ConversionPath<F,T>
findConversion(Class<F> from, Class<T> to)
          Attempt to find a ConversionPath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyArooaConverter

public EmptyArooaConverter()
Method Detail

convert

public <F,T> T convert(F from,
                       Class<T> required)
          throws NoConversionAvailableException,
                 ConversionFailedException
Description copied from interface: ArooaConverter
Convert if possible from the given Object to an equivalent object of the given type.

Specified by:
convert in interface ArooaConverter
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.

findConversion

public <F,T> ConversionPath<F,T> findConversion(Class<F> from,
                                                Class<T> to)
Description copied from interface: ConversionLookup
Attempt to find a ConversionPath.

Specified by:
findConversion in interface ConversionLookup
Parameters:
from - The convert from class.
to - The convert to class.
Returns:
The ConversionPath or null if one can't be found.