public class TypeCast<T>
extends java.lang.Object
Constructor and Description |
---|
TypeCast(java.lang.Class<T> klass)
Constructor
|
Modifier and Type | Method and Description |
---|---|
org.omg.CORBA.Any |
castAny(T data)
Cconverts the data of DataType type into the data of Any type
|
T |
castType(org.omg.CORBA.Any data)
Converts the data of Any type into DataType type
|
T |
castType(org.omg.CORBA.Object obj)
Converts the data into T type
|
java.lang.String |
getDataTypeCodeName()
Gets the name of the data type specified by the type parameter
of Generics
|
static java.lang.String |
getDataTypeCodeName(java.lang.Class klass)
Gets the data type name of the class corresponding
to the specified Class object
|
public TypeCast(java.lang.Class<T> klass)
klass
-
class objectpublic T castType(org.omg.CORBA.Any data)
data
-
datajava.lang.ClassCastException
-
Filed in conversionpublic T castType(org.omg.CORBA.Object obj) throws java.lang.ClassNotFoundException, java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
obj
-
datajava.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public org.omg.CORBA.Any castAny(T data)
data
-
datajava.lang.ClassCastException
-
Filed in conversionpublic static java.lang.String getDataTypeCodeName(java.lang.Class klass)
klass
-
Class objectpublic java.lang.String getDataTypeCodeName()