|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tuscany.sca.databinding.impl.BaseTransformer<T,java.lang.Object> org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer<T>
public abstract class SimpleType2JavaTransformer<T>
Transformer to convert data from a databinding's representation of simple types to Java Objects
Field Summary | |
---|---|
protected SimpleTypeMapper |
mapper
|
Constructor Summary | |
---|---|
SimpleType2JavaTransformer()
|
|
SimpleType2JavaTransformer(SimpleTypeMapper mapper)
|
Method Summary | |
---|---|
protected void |
close(T source)
To be overrided by the subclass |
java.lang.String |
getTargetDataBinding()
Get the target type that this transformer transforms data into. |
protected java.lang.Class<java.lang.Object> |
getTargetType()
|
protected abstract java.lang.String |
getText(T source)
Get the string value from the source |
int |
getWeight()
Get the cost of the transformation. |
java.lang.Object |
transform(T source,
TransformationContext context)
Transform source data into the result type. |
Methods inherited from class org.apache.tuscany.sca.databinding.impl.BaseTransformer |
---|
getSourceDataBinding, getSourceType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.tuscany.sca.databinding.Transformer |
---|
getSourceDataBinding |
Field Detail |
---|
protected SimpleTypeMapper mapper
Constructor Detail |
---|
public SimpleType2JavaTransformer()
public SimpleType2JavaTransformer(SimpleTypeMapper mapper)
Method Detail |
---|
public java.lang.Object transform(T source, TransformationContext context)
PullTransformer
transform
in interface PullTransformer<T,java.lang.Object>
source
- The source datacontext
- The context for the transformation
protected java.lang.Class<java.lang.Object> getTargetType()
getTargetType
in class BaseTransformer<T,java.lang.Object>
public int getWeight()
Transformer
getWeight
in interface Transformer
getWeight
in class BaseTransformer<T,java.lang.Object>
protected abstract java.lang.String getText(T source)
source
-
protected void close(T source)
source
- public java.lang.String getTargetDataBinding()
Transformer
getTargetDataBinding
in interface Transformer
getTargetDataBinding
in class BaseTransformer<T,java.lang.Object>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |