public class SimpleDataType<T> extends Object implements DataType<T>, Cloneable
Modifier and Type | Field and Description |
---|---|
static String |
CHARSET_PARAM |
protected String |
encoding |
protected String |
mimeType |
protected Class<?> |
type |
ANY_MIME_TYPE, BYTE_ARRAY_DATA_TYPE, OBJECT_DATA_TYPE, STRING_DATA_TYPE
Constructor and Description |
---|
SimpleDataType(Class type) |
SimpleDataType(Class<?> type,
String mimeType) |
Modifier and Type | Method and Description |
---|---|
DataType |
cloneDataType()
Create an exact copy of this datatype
|
boolean |
equals(Object o) |
String |
getEncoding()
The encoding for the object to transform
|
String |
getMimeType()
The mime type of the the source object to transform.
|
Class |
getType()
The object type of the source object to transform.
|
int |
hashCode() |
boolean |
isCompatibleWith(DataType dataType)
Used to determine if this data type is compatible with the data type passed in.
|
void |
setEncoding(String encoding)
The encoding for the object to transform
|
void |
setMimeType(String mimeType)
The mime type of the the source object to transform.
|
String |
toString() |
public static final String CHARSET_PARAM
protected final Class<?> type
protected String mimeType
protected String encoding
public SimpleDataType(Class type)
public Class getType()
DataType
public String getMimeType()
DataType
getMimeType
in interface DataType<T>
public void setMimeType(String mimeType)
DataType
setMimeType
in interface DataType<T>
mimeType
- the mime type of the source object. This may be null if the mime type is not known, or if the mime type is
not neededpublic String getEncoding()
DataType
getEncoding
in interface DataType<T>
public void setEncoding(String encoding)
DataType
setEncoding
in interface DataType<T>
public boolean isCompatibleWith(DataType dataType)
DataType
isCompatibleWith
in interface DataType<T>
dataType
- the dataType object to compare withpublic DataType cloneDataType()
DataType
cloneDataType
in interface DataType<T>
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.