|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.toplink.libraries.asm.Type
public class Type
A Java type. This class can be used to make it easier to manipulate type and method descriptors.
| Field Summary | |
|---|---|
static int |
ARRAYThe sort of array reference types. |
static int |
BOOLEANThe sort of the boolean type. |
static Type |
BOOLEAN_TYPEThe boolean type. |
static int |
BYTEThe sort of the byte type. |
static Type |
BYTE_TYPEThe byte type. |
static int |
CHARThe sort of the char type. |
static Type |
CHAR_TYPEThe char type. |
static int |
DOUBLEThe sort of the double type. |
static Type |
DOUBLE_TYPEThe double type. |
static int |
FLOATThe sort of the float type. |
static Type |
FLOAT_TYPEThe float type. |
static int |
INTThe sort of the int type. |
static Type |
INT_TYPEThe int type. |
static int |
LONGThe sort of the long type. |
static Type |
LONG_TYPEThe long type. |
static int |
OBJECTThe sort of object reference type. |
static int |
SHORTThe sort of the short type. |
static Type |
SHORT_TYPEThe short type. |
static int |
VOIDThe sort of the void type. |
static Type |
VOID_TYPEThe void type. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)Tests if the given object is equal to this type. |
static Type[] |
getArgumentTypes(java.lang.reflect.Method method)Returns the Java types corresponding to the argument types of the given method. |
static Type[] |
getArgumentTypes(java.lang.String methodDescriptor)Returns the Java types corresponding to the argument types of the given method descriptor. |
java.lang.String |
getClassName()Returns the name of the class corresponding to this type. |
java.lang.String |
getDescriptor()Returns the descriptor corresponding to this Java type. |
static java.lang.String |
getDescriptor(java.lang.Class c)Returns the descriptor corresponding to the given Java type. |
int |
getDimensions()Returns the number of dimensions of this array type. |
Type |
getElementType()Returns the type of the elements of this array type. |
java.lang.String |
getInternalName()Returns the internal name of the class corresponding to this object type. |
static java.lang.String |
getInternalName(java.lang.Class c)Returns the internal name of the given class. |
static java.lang.String |
getMethodDescriptor(java.lang.reflect.Method m)Returns the descriptor corresponding to the given method. |
static java.lang.String |
getMethodDescriptor(Type returnType, Type[] argumentTypes)Returns the descriptor corresponding to the given argument and return types. |
int |
getOpcode(int opcode)Returns a JVM instruction opcode adapted to this Java type. |
static Type |
getReturnType(java.lang.reflect.Method method)Returns the Java type corresponding to the return type of the given method. |
static Type |
getReturnType(java.lang.String methodDescriptor)Returns the Java type corresponding to the return type of the given method descriptor. |
int |
getSize()Returns the size of values of this type. |
int |
getSort()Returns the sort of this Java type. |
static Type |
getType(java.lang.Class c)Returns the Java type corresponding to the given class. |
static Type |
getType(java.lang.String typeDescriptor)Returns the Java type corresponding to the given type descriptor. |
int |
hashCode()Returns a hash code value for this type. |
java.lang.String |
toString()Returns a string representation of this type. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int VOID
TypegetSort.
public static final int BOOLEAN
TypegetSort.
public static final int CHAR
TypegetSort.
public static final int BYTE
TypegetSort.
public static final int SHORT
TypegetSort.
public static final int INT
TypegetSort.
public static final int FLOAT
TypegetSort.
public static final int LONG
TypegetSort.
public static final int DOUBLE
TypegetSort.
public static final int ARRAY
TypegetSort.
public static final int OBJECT
TypegetSort.
public static final Type VOID_TYPE
Typepublic static final Type BOOLEAN_TYPE
Typepublic static final Type CHAR_TYPE
Typepublic static final Type BYTE_TYPE
Typepublic static final Type SHORT_TYPE
Typepublic static final Type INT_TYPE
Typepublic static final Type FLOAT_TYPE
Typepublic static final Type LONG_TYPE
Typepublic static final Type DOUBLE_TYPE
Type| Method Detail |
|---|
public static Type getType(java.lang.String typeDescriptor)
typeDescriptor - a type descriptor.public static Type getType(java.lang.Class c)
c - a class.public static Type[] getArgumentTypes(java.lang.String methodDescriptor)
methodDescriptor - a method descriptor.public static Type[] getArgumentTypes(java.lang.reflect.Method method)
method - a method.public static Type getReturnType(java.lang.String methodDescriptor)
methodDescriptor - a method descriptor.public static Type getReturnType(java.lang.reflect.Method method)
method - a method.public int getSort()
VOID, BOOLEAN, CHAR, BYTE, SHORT, INT, FLOAT, LONG, DOUBLE, ARRAY or OBJECT.public int getDimensions()
public Type getElementType()
public java.lang.String getClassName()
public java.lang.String getInternalName()
public java.lang.String getDescriptor()
public static java.lang.String getMethodDescriptor(Type returnType,
Type[] argumentTypes)
returnType - the return type of the method.argumentTypes - the argument types of the method.public static java.lang.String getInternalName(java.lang.Class c)
c - an object class.public static java.lang.String getDescriptor(java.lang.Class c)
c - an object class, a primitive class or an array class.public static java.lang.String getMethodDescriptor(java.lang.reflect.Method m)
m - a Method object.public int getSize()
public int getOpcode(int opcode)
opcode - a JVM instruction opcode. This opcode must be one of ILOAD, ISTORE, IALOAD, IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, ISHR, IUSHR, IAND, IOR, IXOR and IRETURN.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to be compared to this type.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||