2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.databinding.saxon
Class Value2ObjectTransformer
java.lang.Object
org.apache.tuscany.sca.databinding.impl.BaseTransformer<Value,java.lang.Object>
org.apache.tuscany.sca.databinding.saxon.Value2ObjectTransformer
- All Implemented Interfaces:
- PullTransformer<Value,java.lang.Object>, Transformer
public class Value2ObjectTransformer
- extends BaseTransformer<Value,java.lang.Object>
- implements PullTransformer<Value,java.lang.Object>
Transforms Value objects to generic java objects
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Value2ObjectTransformer
public Value2ObjectTransformer()
transform
public java.lang.Object transform(Value source,
TransformationContext context)
- Description copied from interface:
PullTransformer
- Transform source data into the result type.
- Specified by:
transform
in interface PullTransformer<Value,java.lang.Object>
- Parameters:
source
- The source datacontext
- The context for the transformation
- Returns:
- The transformed result
getSourceType
protected java.lang.Class<Value> getSourceType()
- Specified by:
getSourceType
in class BaseTransformer<Value,java.lang.Object>
getTargetType
protected java.lang.Class<java.lang.Object> getTargetType()
- Specified by:
getTargetType
in class BaseTransformer<Value,java.lang.Object>
getTargetDataBinding
public java.lang.String getTargetDataBinding()
- Description copied from interface:
Transformer
- Get the target type that this transformer transforms data into. The type is used as the key when the transformer
is registered with TransformerRegistry.
- Specified by:
getTargetDataBinding
in interface Transformer
- Overrides:
getTargetDataBinding
in class BaseTransformer<Value,java.lang.Object>
- Returns:
- A key identifying the target type
getWeight
public int getWeight()
- Description copied from interface:
Transformer
- Get the cost of the transformation. The weight can be used to choose the most efficient path if there are more
than one available from the source to the target.
- Specified by:
getWeight
in interface Transformer
- Overrides:
getWeight
in class BaseTransformer<Value,java.lang.Object>
- Returns:
- An integer representing the cost of the transformation