Package org.apache.camel.spi
Class DataType
- java.lang.Object
-
- org.apache.camel.spi.DataType
-
public class DataType extends Object
Represents the data type URN which is used for message data type contract. Java class doesn't always explain the data type completely, for example XML and JSON data format is sometimes serialized as aString
,InputStream
or etc. TheDataTypeAware
message stores the DataType as a part of the message to carry those data type information even if it's marshaled, so that it could be leveraged to detect requiredTransformer
andValidator
. DataType consists of two parts, 'model' and 'name'. Its string representation is 'model:name' connected with colon. For example 'java:com.example.Order', 'xml:ABCOrder' or 'json:XYZOrder'. These type name other than java class name allows the message to carry the name of the message data structure even if it's marshaled.- See Also:
DataTypeAware
,Transformer
,Validator
-
-
Field Summary
Fields Modifier and Type Field Description static String
JAVA_TYPE_PREFIX
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object target)
String
getModel()
String
getName()
int
hashCode()
boolean
isJavaType()
String
toString()
-
-
-
Field Detail
-
JAVA_TYPE_PREFIX
public static final String JAVA_TYPE_PREFIX
- See Also:
- Constant Field Values
-
-