public class TransformerClosure extends Object implements Closure, Serializable
Constructor and Description |
---|
TransformerClosure(Transformer transformer)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(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.
|
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(Object input)
public Transformer getTransformer()
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.