org.apache.tuscany.sca.databinding.json
Class JSON2JavaBean

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.json.JSON2JavaBean
All Implemented Interfaces:
PullTransformer<java.lang.Object,java.lang.Object>, Transformer

public class JSON2JavaBean
extends java.lang.Object
implements PullTransformer<java.lang.Object,java.lang.Object>


Constructor Summary
JSON2JavaBean()
           
 
Method Summary
 java.lang.String getSourceDataBinding()
          Get the source type that this transformer transforms data from.
 java.lang.String getTargetDataBinding()
          Get the target type that this transformer transforms data into.
 int getWeight()
          Get the cost of the transformation.
 java.lang.Object transform(java.lang.Object source, TransformationContext context)
          Transform source data into the result type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSON2JavaBean

public JSON2JavaBean()
Method Detail

transform

public java.lang.Object transform(java.lang.Object source,
                                  TransformationContext context)
Description copied from interface: PullTransformer
Transform source data into the result type.

Specified by:
transform in interface PullTransformer<java.lang.Object,java.lang.Object>
Parameters:
source - The source data
context - The context for the transformation
Returns:
The transformed result

getSourceDataBinding

public java.lang.String getSourceDataBinding()
Description copied from interface: Transformer
Get the source type that this transformer transforms data from. The type is used as the key when the transformer is registered with TransformerRegistry.

Specified by:
getSourceDataBinding in interface Transformer
Returns:
A key identifying the source type

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
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
Returns:
An integer representing the cost of the transformation