public class TransformerClosure extends java.lang.Object implements Closure, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Transformer |
iTransformer
The transformer to wrap
|
private static long |
serialVersionUID
Serial version UID
|
Constructor and Description |
---|
TransformerClosure(Transformer transformer)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(java.lang.Object input)
Executes the closure by calling the decorated transformer.
|
static Closure |
getInstance(Transformer transformer)
Factory method that performs validation.
|
Transformer |
getTransformer()
Gets the transformer.
|
private static final long serialVersionUID
private final Transformer iTransformer
public TransformerClosure(Transformer transformer)
getInstance
if you want that.transformer
- the transformer to call, not nullpublic static Closure getInstance(Transformer transformer)
A null transformer will return the NOPClosure
.
transformer
- the transformer to call, null means noptransformer
closurepublic void execute(java.lang.Object input)
public Transformer getTransformer()