public class ObjectToAnyTransform extends Transform
Modifier and Type | Field and Description |
---|---|
static ObjectToAnyTransform |
INSTANCE |
Constructor and Description |
---|
ObjectToAnyTransform(Class targetClass) |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
convertPrimitiveToObject(Class<?> clazz)
Convert a primitive class to the corresponding object class
|
Class |
getSourceType()
Type of the incoming value.
|
Class |
getTargetType()
Type of the outgoing value.
|
boolean |
isExplicit() |
Object |
transform(Object value,
Class<?> targetType)
This method transforms a value of the source type into a value
of the target type.
|
protected Object |
transformDirect(Object value) |
getDescription, getDisplayName, getSourceTypeName, getTargetTypeName, toString
public static final ObjectToAnyTransform INSTANCE
public ObjectToAnyTransform(Class targetClass)
public Class getSourceType()
getSourceType
in class Transform
public Class getTargetType()
Transform
getTargetType
in class Transform
public Object transform(Object value, Class<?> targetType) throws TransformationException
Transform
transform
in class Transform
value
- Incoming value of source typeTransformationException
- if value is an incorrect input type or
the transformation failsprotected Object transformDirect(Object value) throws TransformationException
transformDirect
in class Transform
TransformationException
public boolean isExplicit()
isExplicit
in class Transform
Transform.isExplicit()
Copyright © 2018 JBoss by Red Hat. All rights reserved.