public class DummyTransformer extends Object implements Validator, Transformer
This class provides dummy implementations for the Transformer
and the Validator
interfaces.
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.
Constructor and Description |
---|
DummyTransformer() |
Modifier and Type | Method and Description |
---|---|
static DummyTransformer |
getInstance()
Returns the singleton instance of this class.
|
ValidationResult |
isValid(Object o,
TransformerContext ctx)
Performs validation.
|
Object |
transform(Object o,
TransformerContext ctx)
Transforms the passed in object.
|
public ValidationResult isValid(Object o, TransformerContext ctx)
public Object transform(Object o, TransformerContext ctx)
transform
in interface Transformer
o
- the object to be transformedctx
- the transformer context (ignored)public static DummyTransformer getInstance()
Copyright © 2016 The JGUIraffe Team. All rights reserved.