Package net.sf.jguiraffe.transform
Class DummyTransformer
- java.lang.Object
-
- net.sf.jguiraffe.transform.DummyTransformer
-
- All Implemented Interfaces:
Transformer,Validator
public class DummyTransformer extends Object implements Validator, Transformer
This class provides dummy implementations for the
Transformerand theValidatorinterfaces.Validation is implemented by always returning a validation result object indicating a successful validation. Transformation is implemented as a noop, by simply returning the passed in object. The services of this class can be obtained using a singleton instance.
- Version:
- $Id: DummyTransformer.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description DummyTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DummyTransformergetInstance()Returns the singleton instance of this class.ValidationResultisValid(Object o, TransformerContext ctx)Performs validation.Objecttransform(Object o, TransformerContext ctx)Transforms the passed in object.
-
-
-
Method Detail
-
isValid
public ValidationResult isValid(Object o, TransformerContext ctx)
Performs validation. Always returns a positive result.
-
transform
public Object transform(Object o, TransformerContext ctx)
Transforms the passed in object. This implementation simply returns the same object.- Specified by:
transformin interfaceTransformer- Parameters:
o- the object to be transformedctx- the transformer context (ignored)- Returns:
- the resulting object
-
getInstance
public static DummyTransformer getInstance()
Returns the singleton instance of this class.- Returns:
- the shared instance
-
-