Method Summary |
|
public static Transformer | asTransformer(Closure closure) Creates a Transformer that calls a Closure each time the transformer is used. |
public static Transformer | asTransformer(Predicate predicate) Creates a Transformer that calls a Predicate each time the transformer is used. |
public static Transformer | asTransformer(Factory factory) Creates a Transformer that calls a Factory each time the transformer is used. |
public static Transformer | chainedTransformer(Transformer transformer1, Transformer transformer2) Create a new Transformer that calls two transformers, passing the result of
the first into the second. |
public static Transformer | chainedTransformer(Transformer[] transformers) Create a new Transformer that calls each transformer in turn, passing the
result into the next transformer. |
public static Transformer | chainedTransformer(Collection transformers) Create a new Transformer that calls each transformer in turn, passing the
result into the next transformer. |
public static Transformer | cloneTransformer() Gets a transformer that returns a clone of the input
object. |
public static Transformer | constantTransformer(Object constantToReturn) Creates a Transformer that will return the same object each time the
transformer is used. |
public static Transformer | exceptionTransformer() Gets a transformer that always throws an exception. |
public static Transformer | instantiateTransformer() Gets a Transformer that expects an input Class object that it will instantiate. |
public static Transformer | instantiateTransformer(Class[] paramTypes, Object[] args) Creates a Transformer that expects an input Class object that it will
instantiate. |
public static Transformer | invokerTransformer(String methodName) Gets a Transformer that invokes a method on the input object.
The method must have no parameters. |
public static Transformer | invokerTransformer(String methodName, Class[] paramTypes, Object[] args) Gets a Transformer that invokes a method on the input object.
The method parameters are specified. |
public static Transformer | mapTransformer(Map map) Creates a Transformer that uses the passed in Map to transform the input
object (as a simple lookup). |
public static Transformer | nopTransformer() Gets a transformer that returns the input object. |
public static Transformer | nullTransformer() Gets a transformer that always returns null. |
public static Transformer | stringValueTransformer() Gets a transformer that returns a java.lang.String
representation of the input object. |
public static Transformer | switchMapTransformer(Map objectsAndTransformers) Create a new Transformer that uses the input object as a key to find the
transformer to call. |
public static Transformer | switchTransformer(Predicate predicate, Transformer trueTransformer, Transformer falseTransformer) Create a new Transformer that calls one of two transformers depending
on the specified predicate. |
public static Transformer | switchTransformer(Predicate[] predicates, Transformer[] transformers) Create a new Transformer that calls one of the transformers depending
on the predicates. |
public static Transformer | switchTransformer(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer) Create a new Transformer that calls one of the transformers depending
on the predicates. |
public static Transformer | switchTransformer(Map predicatesAndTransformers) Create a new Transformer that calls one of the transformers depending
on the predicates. |