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
TransformerWrapperinterface.An instance of this class is constructed with a
Transformerand aTransformerContext. A transformation is implemented by delegating to theTransformerpassing in theTransformerContext.- Since:
- 1.3
- Version:
- $Id$
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description DefaultTransformerWrapper(Transformer t, TransformerContext ctx)Creates a new instance ofDefaultTransformerWrapperand initializes it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransformergetTransformer()Returns the wrapped transformer.TransformerContextgetTransformerContext()Returns the transformer context to use.Objecttransform(Object o)Invokes the transformer.
-
-
-
Constructor Detail
-
DefaultTransformerWrapper
public DefaultTransformerWrapper(Transformer t, TransformerContext ctx)
Creates a new instance ofDefaultTransformerWrapperand 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:
transformin interfaceTransformerWrapper- Parameters:
o- the object to transform- Returns:
- the transformed object
-
-