|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl<L>
public class DataTypeImpl<L>
Representation of the type of data associated with an operation. Data is
represented in two forms: the physical form used by the runtime and a logical
form used by the assembly. The physical form is a Java Type because the
runtime is written in Java. This may be the same form used by the application
but it may not; for example, an application that is performing stream
processing may want a physical form such as an
InputStream
to semantially operate on application
data such as a purchase order. The logical description is that used by the
assembly model and is an identifier into some well-known type space; examples
may be a Java type represented by its Class or an XML type represented by its
QName. Every data type may also contain metadata describing the expected
data; for example, it could specify a preferred data binding technology or
the size of a typical instance.
Constructor Summary | |
---|---|
DataTypeImpl(java.lang.Class<?> physical,
L logical)
Construct a data type specifying the physical and logical types. |
|
DataTypeImpl(java.lang.String dataBinding,
java.lang.Class<?> physical,
L logical)
|
|
DataTypeImpl(java.lang.String dataBinding,
java.lang.Class<?> physical,
java.lang.reflect.Type genericType,
L logical)
|
Method Summary | ||
---|---|---|
java.lang.Object |
clone()
Clone a data type |
|
boolean |
equals(java.lang.Object obj)
|
|
java.lang.String |
getDataBinding()
Get the databinding for the given data type |
|
java.lang.reflect.Type |
getGenericType()
Get the java generic type |
|
L |
getLogical()
Returns the logical identifier used by the assembly. |
|
|
getMetaData(java.lang.Class<T> type)
Get the databinding-specific metadata |
|
java.lang.Class<?> |
getPhysical()
Returns the physical type used by the runtime. |
|
int |
hashCode()
|
|
void |
setDataBinding(java.lang.String dataBinding)
Set the databinding for the given data type |
|
void |
setGenericType(java.lang.reflect.Type genericType)
Set the java generic type |
|
void |
setLogical(L logical)
Set the logical type of the data type |
|
|
setMetaData(java.lang.Class<T> type,
T metaData)
Set the databinding-specific metadata |
|
void |
setPhysical(java.lang.Class<?> physical)
Set the java type for the data |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataTypeImpl(java.lang.Class<?> physical, L logical)
physical
- the physical class used by the runtimelogical
- the logical typegetLogical()
public DataTypeImpl(java.lang.String dataBinding, java.lang.Class<?> physical, L logical)
dataBinding
- physical
- logical
- public DataTypeImpl(java.lang.String dataBinding, java.lang.Class<?> physical, java.lang.reflect.Type genericType, L logical)
dataBinding
- physical
- genericType
- logical
- Method Detail |
---|
public java.lang.Class<?> getPhysical()
getPhysical
in interface DataType<L>
public void setPhysical(java.lang.Class<?> physical)
DataType
setPhysical
in interface DataType<L>
physical
- the physical to setpublic java.lang.reflect.Type getGenericType()
getGenericType
in interface DataType<L>
public void setGenericType(java.lang.reflect.Type genericType)
setGenericType
in interface DataType<L>
genericType
- public L getLogical()
getLogical
in interface DataType<L>
public void setLogical(L logical)
DataType
setLogical
in interface DataType<L>
logical
- the logical to setpublic java.lang.String getDataBinding()
DataType
getDataBinding
in interface DataType<L>
public void setDataBinding(java.lang.String dataBinding)
DataType
setDataBinding
in interface DataType<L>
dataBinding
- the dataBinding to setpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
DataType
clone
in interface DataType<L>
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public <T> T getMetaData(java.lang.Class<T> type)
DataType
getMetaData
in interface DataType<L>
type
- The java type of the metadata
public <T> void setMetaData(java.lang.Class<T> type, T metaData)
DataType
setMetaData
in interface DataType<L>
type
- The java type of the metadatametaData
- the databinding-specific metadata, such as SDO's commonj.sdo.Type or
JAXB's javax.xml.bind.JAXBContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |