public class DefaultTransformerWrapper extends Object implements TransformerWrapper
A default implementation of the TransformerWrapper
interface.
An instance of this class is constructed with a Transformer
and a
TransformerContext
. A transformation is implemented by delegating to
the Transformer
passing in the TransformerContext
.
Constructor and Description |
---|
DefaultTransformerWrapper(Transformer t,
TransformerContext ctx)
Creates a new instance of
DefaultTransformerWrapper and
initializes it. |
Modifier and Type | Method and Description |
---|---|
Transformer |
getTransformer()
Returns the wrapped transformer.
|
TransformerContext |
getTransformerContext()
Returns the transformer context to use.
|
Object |
transform(Object o)
Invokes the transformer.
|
public DefaultTransformerWrapper(Transformer t, TransformerContext ctx)
DefaultTransformerWrapper
and
initializes it.t
- the transformer (must not be null)ctx
- the transformer context (must not be null)IllegalArgumentException
- if a required argument is missingpublic Transformer getTransformer()
public TransformerContext getTransformerContext()
public Object transform(Object o)
transform
in interface TransformerWrapper
o
- the object to transformCopyright © 2016 The JGUIraffe Team. All rights reserved.