Package org.teiid.core.types.basic
Class AnyToObjectTransform
- java.lang.Object
-
- org.teiid.core.types.Transform
-
- org.teiid.core.types.basic.AnyToObjectTransform
-
public class AnyToObjectTransform extends Transform
-
-
Field Summary
Fields Modifier and Type Field Description static AnyToObjectTransform
INSTANCE
-
Constructor Summary
Constructors Constructor Description AnyToObjectTransform(Class<?> sourceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getSourceType()
Type of the incoming value.Class<?>
getTargetType()
Type of the outgoing value.Object
transformDirect(Object value)
This method transforms a value of the source type into a value of the target type.-
Methods inherited from class org.teiid.core.types.Transform
getDescription, getDisplayName, getSourceTypeName, getTargetTypeName, isExplicit, toString, transform
-
-
-
-
Field Detail
-
INSTANCE
public static final AnyToObjectTransform INSTANCE
-
-
Constructor Detail
-
AnyToObjectTransform
public AnyToObjectTransform(Class<?> sourceType)
-
-
Method Detail
-
getSourceType
public Class<?> getSourceType()
Description copied from class:Transform
Type of the incoming value.- Specified by:
getSourceType
in classTransform
- Returns:
- Source type
-
transformDirect
public Object transformDirect(Object value) throws TransformationException
This method transforms a value of the source type into a value of the target type.- Specified by:
transformDirect
in classTransform
- Parameters:
value
- Incoming value of source type- Returns:
- Outgoing value of target type
- Throws:
TransformationException
- if value is an incorrect input type or the transformation fails
-
getTargetType
public Class<?> getTargetType()
Type of the outgoing value.- Specified by:
getTargetType
in classTransform
- Returns:
- Target type
-
-