org.mule.transformer.types
Class DataTypeFactory
java.lang.Object
org.mule.transformer.types.DataTypeFactory
public class DataTypeFactory
- extends Object
Factory class used to create DataType objects based on the
parameter types passed into the factory methods.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEXT_STRING
public static final DataType<String> TEXT_STRING
XML_STRING
public static final DataType<String> XML_STRING
JSON_STRING
public static final DataType<String> JSON_STRING
HTML_STRING
public static final DataType<String> HTML_STRING
ATOM_STRING
public static final DataType<String> ATOM_STRING
RSS_STRING
public static final DataType<String> RSS_STRING
DataTypeFactory
public DataTypeFactory()
create
public <T> DataType<T> create(Class<T> type)
create
public <T> DataType<T> create(Class<?> type,
String mimeType)
create
public DataType create(Class<? extends Collection> collClass,
Class itemType)
create
public DataType create(Class<? extends Collection> collClass,
Class itemType,
String mimeType)
createFromObject
public DataType createFromObject(Object o)
- Will create a
DataType object from an object instance. This method will check
if the object o is a MuleMessage instance and will take the type from the message payload
and check if a mime type is set on the message and used that when constructing the DataType
object.
- Parameters:
o - an object instance. This can be a MuleMessage, a collection, a proxy instance or any other
object
- Returns:
- a data type that represents the object type.
createFromReturnType
public DataType createFromReturnType(Method m)
createFromReturnType
public DataType createFromReturnType(Method m,
String mimeType)
createFromParameterType
public DataType createFromParameterType(Method m,
int paramIndex)
createFromParameterType
public DataType createFromParameterType(Method m,
int paramIndex,
String mimeType)
createFromField
public DataType createFromField(Field f)
createFromField
public DataType createFromField(Field f,
String mimeType)
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.