Modifier and Type | Field and Description |
---|---|
public static final int | ARRAY
The sort of array reference types. |
public static final int | BOOLEAN
The sort of the |
public static final Type | BOOLEAN_TYPE
The |
public static final int | BYTE
The sort of the |
public static final Type | BYTE_TYPE
The |
public static final int | CHAR
The sort of the |
public static final Type | CHAR_TYPE
The |
public static final int | DOUBLE
The sort of the |
public static final Type | DOUBLE_TYPE
The |
public static final int | FLOAT
The sort of the |
public static final Type | FLOAT_TYPE
The |
public static final int | INT
The sort of the |
public static final Type | INT_TYPE
The |
private static final int | INTERNAL
The (private) sort of object reference types represented with an internal name. |
public static final int | LONG
The sort of the |
public static final Type | LONG_TYPE
The |
public static final int | METHOD
The sort of method types. |
public static final int | OBJECT
The sort of object reference types. |
private static final String | PRIMITIVE_DESCRIPTORS
The descriptors of the primitive types. |
public static final int | SHORT
The sort of the |
public static final Type | SHORT_TYPE
The |
private final int | sort
The sort of this type. |
private final int | valueBegin
The beginning index, inclusive, of the value of this Java field or method type in |
private final String | valueBuffer
A buffer containing the value of this field or method type. |
private final int | valueEnd
The end index, exclusive, of the value of this Java field or method type in |
public static final int | VOID
The sort of the |
public static final Type | VOID_TYPE
The |
Access | Constructor and Description |
---|---|
private | Type(final int
the sort of this type, see sort, final String sort .a buffer containing the value of this field or method type. valueBuffer, final int the beginning index, inclusive, of the value of this field or method type in
valueBuffer. valueBegin, final int the end index, exclusive, of the value of this field or method type in
valueBuffer. valueEnd)Constructs a reference type. |
Modifier and Type | Method and Description |
---|---|
private void | appendDescriptor(final StringBuilder
the string builder to which the descriptor must be appended. stringBuilder)Appends the descriptor corresponding to this type to the given string buffer. |
private static void | appendDescriptor(final Class<?>
the class whose descriptor must be computed. clazz, final StringBuilder the string builder to which the descriptor must be appended. stringBuilder)Appends the descriptor of the given class to the given string builder. |
public boolean | Returns: true if the given object is equal to this type.the object to be compared to this type. object)Overrides java. |
public int | Returns: the number of arguments of this method type. Each argument counts for 1, even long and double ones. The implicit @literal{this} argument is not counted.Returns the number of arguments of this method type. |
public static int | Returns: the number of arguments in the given method descriptor. Each argument counts for 1, even long and double ones. The implicit @literal{this} argument is not counted.a method descriptor. methodDescriptor)Returns the number of arguments in the given method descriptor. |
public int | Returns: the size of the arguments of the method (plus one for the implicit this argument), argumentsSize, and the size of its return value, returnSize, packed into a single int i =(argumentsSize << 2) | returnSize (argumentsSize is therefore equal to i >> 2 , and returnSize to i & 0x03 ). Long and double values have size 2,
the others have size 1.Returns the size of the arguments and of the return value of methods of this type. |
public static int | Returns: the size of the arguments of the method (plus one for the implicit this argument), argumentsSize, and the size of its return value, returnSize, packed into a single int i =(argumentsSize << 2) | returnSize (argumentsSize is therefore equal to i >> 2 , and returnSize to i & 0x03 ). Long and double values have size 2,
the others have size 1.a method descriptor. methodDescriptor)Computes the size of the arguments and of the return value of a method. |
public Type[] | Returns: the argument types of methods of this type.Returns the argument types of methods of this type. |
public static Type[] | Returns: theType values corresponding to the argument types of the given method
descriptor.a method descriptor. methodDescriptor)Returns the |
public static Type[] | Returns: theType values corresponding to the argument types of the given method.a method. method)Returns the |
public String | Returns: the binary name of the class corresponding to this type.Returns the binary name of the class corresponding to this type. |
public static String | Returns: the descriptor of the given constructor.a constructor)Constructor object.Returns the descriptor corresponding to the given constructor. |
public String | Returns: the descriptor corresponding to this type.Returns the descriptor corresponding to this type. |
public static String | Returns: the descriptor corresponding to the given class.an object class, a primitive class or an array class. clazz)Returns the descriptor corresponding to the given class. |
public int | Returns: the number of dimensions of this array type.Returns the number of dimensions of this array type. |
public Type | Returns: Returns the type of the elements of this array type.Returns the type of the elements of this array type. |
public String | Returns: the internal name of the class corresponding to this object type.Returns the internal name of the class corresponding to this object or array type. |
public static String | Returns: the internal name of the given class.an object or array class. clazz)Returns the internal name of the given class. |
public static String | Returns: the descriptor corresponding to the given argument and return types.the return type of the method. returnType, final Type... the argument types of the method. argumentTypes)Returns the descriptor corresponding to the given argument and return types. |
public static String | Returns: the descriptor of the given method.a method)Method object.Returns the descriptor corresponding to the given method. |
public static Type | Returns: theType corresponding to the given method descriptor.a method descriptor. methodDescriptor)Returns the |
public static Type | Returns: the methodType corresponding to the given argument and return types.the return type of the method. returnType, final Type... the argument types of the method. argumentTypes)Returns the method |
public static Type | Returns: theType corresponding to the given internal name.an internal name (see internalName)Type#getInternalName() ).Returns the |
public int | Returns: an opcode that is similar to the given opcode, but adapted to thisType . For
example, if this type is float and opcode is IRETURN, this method returns
FRETURN.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. opcode)Returns a JVM instruction opcode adapted to this |
public Type | Returns: the return type of methods of this type.Returns the return type of methods of this type. |
public static Type | Returns: theType corresponding to the return type of the given method descriptor.a method descriptor. methodDescriptor)Returns the |
public static Type | Returns: theType corresponding to the return type of the given method.a method. method)Returns the |
pack-priv static int | Returns: the start index of the return type of the given method descriptor.a method descriptor. methodDescriptor)Returns the start index of the return type of the given method descriptor. |
public int | Returns: the size of values of this type, i.e., 2 forlong and double , 0 for
void and 1 otherwise.Returns the size of values of this type. |
public int | |
public static Type | |
public static Type | |
public static Type | Returns: the methodType corresponding to the given constructor.a constructor)Constructor object.Returns the method |
public static Type | |
private static Type | Returns: theType corresponding to the given type descriptor.a buffer containing the field or method descriptor. descriptorBuffer, final int the beginning index, inclusive, of the field or method descriptor in
descriptorBuffer. descriptorBegin, final int the end index, exclusive, of the field or method descriptor in
descriptorBuffer. descriptorEnd)Returns the |
public int | Returns: a hash code value for this type.Overrides java. |
public String | Returns: the descriptor of this type.Overrides java. |
ARRAY | back to summary |
---|---|
public static final int ARRAY The sort of array reference types. See |
BOOLEAN | back to summary |
---|---|
public static final int BOOLEAN The sort of the |
BOOLEAN_TYPE | back to summary |
---|---|
public static final Type BOOLEAN_TYPE The |
BYTE | back to summary |
---|---|
public static final int BYTE The sort of the |
BYTE_TYPE | back to summary |
---|---|
public static final Type BYTE_TYPE The |
CHAR | back to summary |
---|---|
public static final int CHAR The sort of the |
CHAR_TYPE | back to summary |
---|---|
public static final Type CHAR_TYPE The |
DOUBLE | back to summary |
---|---|
public static final int DOUBLE The sort of the |
DOUBLE_TYPE | back to summary |
---|---|
public static final Type DOUBLE_TYPE The |
FLOAT | back to summary |
---|---|
public static final int FLOAT The sort of the |
FLOAT_TYPE | back to summary |
---|---|
public static final Type FLOAT_TYPE The |
INT | back to summary |
---|---|
public static final int INT The sort of the |
INT_TYPE | back to summary |
---|---|
public static final Type INT_TYPE The |
INTERNAL | back to summary |
---|---|
private static final int INTERNAL The (private) sort of object reference types represented with an internal name. |
LONG | back to summary |
---|---|
public static final int LONG The sort of the |
LONG_TYPE | back to summary |
---|---|
public static final Type LONG_TYPE The |
METHOD | back to summary |
---|---|
public static final int METHOD The sort of method types. See |
OBJECT | back to summary |
---|---|
public static final int OBJECT The sort of object reference types. See |
PRIMITIVE_DESCRIPTORS | back to summary |
---|---|
private static final String PRIMITIVE_DESCRIPTORS The descriptors of the primitive types. |
SHORT | back to summary |
---|---|
public static final int SHORT The sort of the |
SHORT_TYPE | back to summary |
---|---|
public static final Type SHORT_TYPE The |
sort | back to summary |
---|---|
private final int sort The sort of this type. Either |
valueBegin | back to summary |
---|---|
private final int valueBegin The beginning index, inclusive, of the value of this Java field or method type in |
valueBuffer | back to summary |
---|---|
private final String valueBuffer A buffer containing the value of this field or method type. This value is an internal name for
For |
valueEnd | back to summary |
---|---|
private final int valueEnd The end index, exclusive, of the value of this Java field or method type in |
VOID | back to summary |
---|---|
public static final int VOID The sort of the |
VOID_TYPE | back to summary |
---|---|
public static final Type VOID_TYPE The |
Type | back to summary |
---|---|
private Type(final int sort, final String valueBuffer, final int valueBegin, final int valueEnd) Constructs a reference type.
|
appendDescriptor | back to summary |
---|---|
private void appendDescriptor(final StringBuilder stringBuilder) Appends the descriptor corresponding to this type to the given string buffer.
|
appendDescriptor | back to summary |
---|---|
private static void appendDescriptor(final Class<?> clazz, final StringBuilder stringBuilder) Appends the descriptor of the given class to the given string builder.
|
equals | back to summary |
---|---|
public boolean equals(final Object object) Overrides java. Tests if the given object is equal to this type. |
getArgumentCount | back to summary |
---|---|
public int getArgumentCount() Returns the number of arguments of this method type. This method should only be used for method types.
|
getArgumentCount | back to summary |
---|---|
public static int getArgumentCount(final String methodDescriptor) Returns the number of arguments in the given method descriptor.
|
getArgumentsAndReturnSizes | back to summary |
---|---|
public int getArgumentsAndReturnSizes() Returns the size of the arguments and of the return value of methods of this type. This method should only be used for method types.
|
getArgumentsAndReturnSizes | back to summary |
---|---|
public static int getArgumentsAndReturnSizes(final String methodDescriptor) Computes the size of the arguments and of the return value of a method.
|
getArgumentTypes | back to summary |
---|---|
public Type[] getArgumentTypes() Returns the argument types of methods of this type. This method should only be used for method types.
|
getArgumentTypes | back to summary |
---|---|
public static Type[] getArgumentTypes(final String methodDescriptor) Returns the |
getArgumentTypes | back to summary |
---|---|
public static Type[] getArgumentTypes(final Method method) Returns the |
getClassName | back to summary |
---|---|
public String getClassName() Returns the binary name of the class corresponding to this type. This method must not be used on method types.
|
getConstructorDescriptor | back to summary |
---|---|
public static String getConstructorDescriptor(final Constructor<?> constructor) Returns the descriptor corresponding to the given constructor.
|
getDescriptor | back to summary |
---|---|
public String getDescriptor() Returns the descriptor corresponding to this type.
|
getDescriptor | back to summary |
---|---|
public static String getDescriptor(final Class<?> clazz) Returns the descriptor corresponding to the given class. |
getDimensions | back to summary |
---|---|
public int getDimensions() Returns the number of dimensions of this array type. This method should only be used for an array type.
|
getElementType | back to summary |
---|---|
public Type getElementType() Returns the type of the elements of this array type. This method should only be used for an array type.
|
getInternalName | back to summary |
---|---|
public String getInternalName() Returns the internal name of the class corresponding to this object or array type. The internal name of a class is its fully qualified name (as returned by Class.getName(), where '.' are replaced by '/'). This method should only be used for an object or array type.
|
getInternalName | back to summary |
---|---|
public static String getInternalName(final Class<?> clazz) Returns the internal name of the given class. The internal name of a class is its fully qualified name, as returned by Class.getName(), where '.' are replaced by '/'. |
getMethodDescriptor | back to summary |
---|---|
public static String getMethodDescriptor(final Type returnType, final Type... argumentTypes) Returns the descriptor corresponding to the given argument and return types. |
getMethodDescriptor | back to summary |
---|---|
public static String getMethodDescriptor(final Method method) Returns the descriptor corresponding to the given method. |
getMethodType | back to summary |
---|---|
public static Type getMethodType(final String methodDescriptor) Returns the |
getMethodType | back to summary |
---|---|
public static Type getMethodType(final Type returnType, final Type... argumentTypes) Returns the method |
getObjectType | back to summary |
---|---|
public static Type getObjectType(final String internalName) Returns the
|
getOpcode | back to summary |
---|---|
public int getOpcode(final int opcode) Returns a JVM instruction opcode adapted to this
|
getReturnType | back to summary |
---|---|
public Type getReturnType() Returns the return type of methods of this type. This method should only be used for method types.
|
getReturnType | back to summary |
---|---|
public static Type getReturnType(final String methodDescriptor) Returns the |
getReturnType | back to summary |
---|---|
public static Type getReturnType(final Method method) Returns the |
getReturnTypeOffset | back to summary |
---|---|
pack-priv static int getReturnTypeOffset(final String methodDescriptor) Returns the start index of the return type of the given method descriptor.
|
getSize | back to summary |
---|---|
public int getSize() Returns the size of values of this type. This method must not be used for method types.
|
getSort | back to summary |
---|---|
public int getSort() Returns the sort of this type. |
getType | back to summary |
---|---|
public static Type getType(final String typeDescriptor) Returns the |
getType | back to summary |
---|---|
public static Type getType(final Class<?> clazz) Returns the |
getType | back to summary |
---|---|
public static Type getType(final Constructor<?> constructor) Returns the method
|
getType | back to summary |
---|---|
public static Type getType(final Method method) Returns the method |
getTypeInternal | back to summary |
---|---|
private static Type getTypeInternal(final String descriptorBuffer, final int descriptorBegin, final int descriptorEnd) Returns the
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Returns a hash code value for this type.
|
toString | back to summary |
---|---|
public String toString() Overrides java. Returns a string representation of this type. |