open class Type
A Java field or method type. This class can be used to make it easier to manipulate type and method descriptors.
Author
Eric Bruneton
Author
Chris Nokleberg
static val ARRAY: Int
The sort of array reference types. See |
|
static val BOOLEAN: Int
The sort of the boolean type. See |
|
static val BOOLEAN_TYPE: Type
The boolean type. |
|
static val BYTE: Int
The sort of the byte type. See |
|
static val BYTE_TYPE: Type
The byte type. |
|
static val CHAR: Int
The sort of the char type. See |
|
static val CHAR_TYPE: Type
The char type. |
|
static val DOUBLE: Int
The sort of the double type. See |
|
static val DOUBLE_TYPE: Type
The double type. |
|
static val FLOAT: Int
The sort of the float type. See |
|
static val FLOAT_TYPE: Type
The float type. |
|
static val INT: Int
The sort of the int type. See |
|
static val INT_TYPE: Type
The int type. |
|
static val LONG: Int
The sort of the long type. See |
|
static val LONG_TYPE: Type
The long type. |
|
static val METHOD: Int
The sort of method types. See |
|
static val OBJECT: Int
The sort of object reference types. See |
|
static val SHORT: Int
The sort of the short type. See |
|
static val SHORT_TYPE: Type
The short type. |
|
static val VOID: Int
The sort of the void type. See |
|
static val VOID_TYPE: Type
The void type. |
open fun equals(other: Any?): Boolean
Tests if the given object is equal to this type. |
|
open fun getArgumentTypes(): Array<Type>
Returns the argument types of methods of this type. This method should only be used for method types. open static fun getArgumentTypes(methodDescriptor: String): Array<Type>
Returns the Java types corresponding to the argument types of the given method descriptor. open static fun getArgumentTypes(method: Method): Array<Type>
Returns the Java types corresponding to the argument types of the given method. |
|
open fun getArgumentsAndReturnSizes(): Int
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. open static fun getArgumentsAndReturnSizes(desc: String): Int
Computes the size of the arguments and of the return value of a method. |
|
open fun getClassName(): String
Returns the binary name of the class corresponding to this type. This method must not be used on method types. |
|
open static fun getConstructorDescriptor(c: Constructor<*>): String
Returns the descriptor corresponding to the given constructor. |
|
open fun getDescriptor(): String
Returns the descriptor corresponding to this Java type. open static fun getDescriptor(c: Class<*>): String
Returns the descriptor corresponding to the given Java type. |
|
open fun getDimensions(): Int
Returns the number of dimensions of this array type. This method should only be used for an array type. |
|
open fun getElementType(): Type
Returns the type of the elements of this array type. This method should only be used for an array type. |
|
open fun getInternalName(): String
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. open static fun getInternalName(c: Class<*>): String
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 '/'. |
|
open static fun getMethodDescriptor(returnType: Type, vararg argumentTypes: Type): String
Returns the descriptor corresponding to the given argument and return types. open static fun getMethodDescriptor(m: Method): String
Returns the descriptor corresponding to the given method. |
|
open static fun getMethodType(methodDescriptor: String): Type
Returns the Java type corresponding to the given method descriptor. Equivalent to open static fun getMethodType(returnType: Type, vararg argumentTypes: Type): Type
Returns the Java method type corresponding to the given argument and return types. |
|
open static fun getObjectType(internalName: String): Type
Returns the Java type corresponding to the given internal name. |
|
open fun getOpcode(opcode: Int): Int
Returns a JVM instruction opcode adapted to this Java type. This method must not be used for method types. |
|
open fun getReturnType(): Type
Returns the return type of methods of this type. This method should only be used for method types. open static fun getReturnType(methodDescriptor: String): Type
Returns the Java type corresponding to the return type of the given method descriptor. open static fun getReturnType(method: Method): Type
Returns the Java type corresponding to the return type of the given method. |
|
open fun getSize(): Int
Returns the size of values of this type. This method must not be used for method types. |
|
open fun getSort(): Int
Returns the sort of this Java type. |
|
open static fun getType(typeDescriptor: String): Type
Returns the Java type corresponding to the given type descriptor. open static fun getType(c: Class<*>): Type
Returns the Java type corresponding to the given class. open static fun getType(c: Constructor<*>): Type
Returns the Java method type corresponding to the given constructor. open static fun getType(m: Method): Type
Returns the Java method type corresponding to the given method. |
|
open fun hashCode(): Int
Returns a hash code value for this type. |
|
open fun toString(): String
Returns a string representation of this type. |