public class ClosureTransformer extends java.lang.Object implements Transformer, java.io.Serializable
Constructor and Description |
---|
ClosureTransformer(Closure closure)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
Closure |
getClosure()
Gets the closure.
|
static Transformer |
getInstance(Closure closure)
Factory method that performs validation.
|
java.lang.Object |
transform(java.lang.Object input)
Transforms the input to result by executing a closure.
|
public ClosureTransformer(Closure closure)
getInstance
if you want that.closure
- the closure to call, not nullpublic static Transformer getInstance(Closure closure)
closure
- the closure to call, not nullclosure
transformerjava.lang.IllegalArgumentException
- if the closure is nullpublic java.lang.Object transform(java.lang.Object input)
transform
in interface Transformer
input
- the input object to transformpublic Closure getClosure()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"