Package net.sf.jguiraffe.gui.forms
Class DefaultTransformerWrapper
- java.lang.Object
-
- net.sf.jguiraffe.gui.forms.DefaultTransformerWrapper
-
- All Implemented Interfaces:
TransformerWrapper
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 aTransformerContext
. A transformation is implemented by delegating to theTransformer
passing in theTransformerContext
.- Since:
- 1.3
- Version:
- $Id$
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description DefaultTransformerWrapper(Transformer t, TransformerContext ctx)
Creates a new instance ofDefaultTransformerWrapper
and initializes it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transformer
getTransformer()
Returns the wrapped transformer.TransformerContext
getTransformerContext()
Returns the transformer context to use.Object
transform(Object o)
Invokes the transformer.
-
-
-
Constructor Detail
-
DefaultTransformerWrapper
public DefaultTransformerWrapper(Transformer t, TransformerContext ctx)
Creates a new instance ofDefaultTransformerWrapper
and initializes it.- Parameters:
t
- the transformer (must not be null)ctx
- the transformer context (must not be null)- Throws:
IllegalArgumentException
- if a required argument is missing
-
-
Method Detail
-
getTransformer
public Transformer getTransformer()
Returns the wrapped transformer.- Returns:
- the transformer
-
getTransformerContext
public TransformerContext getTransformerContext()
Returns the transformer context to use.- Returns:
- the transformer context
-
transform
public Object transform(Object o)
Invokes the transformer.- Specified by:
transform
in interfaceTransformerWrapper
- Parameters:
o
- the object to transform- Returns:
- the transformed object
-
-