|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.gilead.core.beanlib.transformer.UnionCustomBeanTransformer
public class UnionCustomBeanTransformer
The UnionCustomBeanTransformer hold an array of CustomBeanTransformerSpi, checks if a given instance of a source class if transformable into a destination class iterating over the array of CustomBeanTransformerSpi finding the first appropriate one. Transforms the given instance of the source class into and instance of a destination class iterating over the array of CustomBeanTransformerSpi finding the first appropriate one. This is a copy and paste from http://groups.google.com/group/beanlib/browse_thread/thread/f300b5470c08f683
Constructor Summary | |
---|---|
UnionCustomBeanTransformer(CustomBeanTransformerSpi... customTransformers)
Register the array of CustomBeanTransformerSpi used by the class |
Method Summary | ||
---|---|---|
|
isTransformable(java.lang.Object from,
java.lang.Class<T> toClass,
PropertyInfo propertyInfo)
Iterate over the given array of CustomBeanTransformerSpi, checking if there is a valid transformer to transform the 'from' object, to the target 'toClass' |
|
|
transform(java.lang.Object in,
java.lang.Class<T> toClass,
PropertyInfo propertyInfo)
Transforms 'in' object into an instance of class 'toClass', using the first valid transformer in the _customTransformers array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnionCustomBeanTransformer(CustomBeanTransformerSpi... customTransformers)
customTransformers
- Method Detail |
---|
public <T> boolean isTransformable(java.lang.Object from, java.lang.Class<T> toClass, PropertyInfo propertyInfo)
from
- the source object instancetoClass
- the destination class to transform the 'from' object in
public <T> T transform(java.lang.Object in, java.lang.Class<T> toClass, PropertyInfo propertyInfo)
in
- the source object to be transformedtoClass
- the destination class which the instance will be returnedpropertyInfo
- the property which will be passed on the to the valid
CustomBeanTransformerSpi registered
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |