|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.arooa.convert.DefaultConversionPath<F,T>
public class DefaultConversionPath<F,T>
Method Summary | ||
---|---|---|
|
append(ConversionStep<T,X> following)
Create a new ConversionPath by adding the given ConversionStep. |
|
boolean |
contains(Class<?> from)
Test if this ConversionPath contains a conversion from the given Class. |
|
T |
convert(F from,
ArooaConverter converter)
Convert the given object using the ConversionPath. |
|
Class<F> |
getFromClass()
Get the from Class of this ConversionPath. |
|
|
getStep(int step)
Get the conversion step for the given index. |
|
Class<T> |
getToClass()
Get the to Class of this ConversionPath. |
|
static
|
instance(Class<X> start)
|
|
int |
length()
Get the number of Steps in this ConversionPath. |
|
|
prepend(ConversionStep<X,F> preceeding)
Create a new ConversionPath by prepending the given ConversionStep. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static <X> ConversionPath<X,X> instance(Class<X> start)
public <X> ConversionPath<F,X> append(ConversionStep<T,X> following)
ConversionPath
append
in interface ConversionPath<F,T>
public <X> ConversionPath<X,T> prepend(ConversionStep<X,F> preceeding)
ConversionPath
prepend
in interface ConversionPath<F,T>
public Class<F> getFromClass()
ConversionPath
getFromClass
in interface ConversionPath<F,T>
public Class<T> getToClass()
ConversionPath
getToClass
in interface ConversionPath<F,T>
public int length()
ConversionPath
length
in interface ConversionPath<F,T>
public boolean contains(Class<?> from)
ConversionPath
contains
in interface ConversionPath<F,T>
public <X,Y> ConversionStep<X,Y> getStep(int step)
ConversionPath
getStep
in interface ConversionPath<F,T>
step
- The index.
public T convert(F from, ArooaConverter converter) throws ConversionFailedException
convert
in interface ConversionPath<F,T>
from
-
ConvertletException
ConversionFailedException
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |