open class TypeReference
A reference to a type appearing in a class, field or method declaration, or on an instruction. Such a reference designates the part of the class where the referenced type is appearing (e.g. an 'extends', 'implements' or 'throws' clause, a 'new' instruction, a 'catch' clause, a type cast, a local variable declaration, etc).
Author
Eric Bruneton
TypeReference(typeRef: Int)
Creates a new TypeReference. |
static val CAST: Int
The sort of type references that target the type declared in an explicit or implicit cast instruction. See |
|
static val CLASS_EXTENDS: Int
The sort of type references that target the super class of a class or one of the interfaces it implements. See |
|
static val CLASS_TYPE_PARAMETER: Int
The sort of type references that target a type parameter of a generic class. See |
|
static val CLASS_TYPE_PARAMETER_BOUND: Int
The sort of type references that target a bound of a type parameter of a generic class. See |
|
static val CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: Int
The sort of type references that target a type parameter of a generic constructor in a constructor call. See |
|
static val CONSTRUCTOR_REFERENCE: Int
The sort of type references that target the receiver type of a constructor reference. See |
|
static val CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: Int
The sort of type references that target a type parameter of a generic constructor in a constructor reference. See |
|
static val EXCEPTION_PARAMETER: Int
The sort of type references that target the type of the exception of a 'catch' clause in a method. See |
|
static val FIELD: Int
The sort of type references that target the type of a field. See |
|
static val INSTANCEOF: Int
The sort of type references that target the type declared in an 'instanceof' instruction. See |
|
static val LOCAL_VARIABLE: Int
The sort of type references that target the type of a local variable in a method. See |
|
static val METHOD_FORMAL_PARAMETER: Int
The sort of type references that target the type of a formal parameter of a method. See |
|
static val METHOD_INVOCATION_TYPE_ARGUMENT: Int
The sort of type references that target a type parameter of a generic method in a method call. See |
|
static val METHOD_RECEIVER: Int
The sort of type references that target the receiver type of a method. See |
|
static val METHOD_REFERENCE: Int
The sort of type references that target the receiver type of a method reference. See |
|
static val METHOD_REFERENCE_TYPE_ARGUMENT: Int
The sort of type references that target a type parameter of a generic method in a method reference. See |
|
static val METHOD_RETURN: Int
The sort of type references that target the return type of a method. See |
|
static val METHOD_TYPE_PARAMETER: Int
The sort of type references that target a type parameter of a generic method. See |
|
static val METHOD_TYPE_PARAMETER_BOUND: Int
The sort of type references that target a bound of a type parameter of a generic method. See |
|
static val NEW: Int
The sort of type references that target the type of the object created by a 'new' instruction. See |
|
static val RESOURCE_VARIABLE: Int
The sort of type references that target the type of a resource variable in a method. See |
|
static val THROWS: Int
The sort of type references that target the type of an exception declared in the throws clause of a method. See |
open fun getExceptionIndex(): Int
Returns the index of the exception, in a 'throws' clause of a method, whose type is referenced by this type reference. This method must only be used for type references whose sort is |
|
open fun getFormalParameterIndex(): Int
Returns the index of the formal parameter whose type is referenced by this type reference. This method must only be used for type references whose sort is |
|
open fun getSort(): Int
Returns the sort of this type reference. |
|
open fun getSuperTypeIndex(): Int
Returns the index of the "super type" of a class that is referenced by this type reference. This method must only be used for type references whose sort is |
|
open fun getTryCatchBlockIndex(): Int
Returns the index of the try catch block (using the order in which they are visited with visitTryCatchBlock), whose 'catch' type is referenced by this type reference. This method must only be used for type references whose sort is |
|
open fun getTypeArgumentIndex(): Int
Returns the index of the type argument referenced by this type reference. This method must only be used for type references whose sort is |
|
open fun getTypeParameterBoundIndex(): Int
Returns the index of the type parameter bound, within the type parameter |
|
open fun getTypeParameterIndex(): Int
Returns the index of the type parameter referenced by this type reference. This method must only be used for type references whose sort is |
|
open fun getValue(): Int
Returns the int encoded value of this type reference, suitable for use in visit methods related to type annotations, like visitTypeAnnotation. |
|
open static fun newExceptionReference(exceptionIndex: Int): TypeReference
Returns a reference to the type of an exception, in a 'throws' clause of a method. |
|
open static fun newFormalParameterReference(paramIndex: Int): TypeReference
Returns a reference to the type of a formal parameter of a method. |
|
open static fun newSuperTypeReference(itfIndex: Int): TypeReference
Returns a reference to the super class or to an interface of the 'implements' clause of a class. |
|
open static fun newTryCatchReference(tryCatchBlockIndex: Int): TypeReference
Returns a reference to the type of the exception declared in a 'catch' clause of a method. |
|
open static fun newTypeArgumentReference(sort: Int, argIndex: Int): TypeReference
Returns a reference to the type of a type argument in a constructor or method call or reference. |
|
open static fun newTypeParameterBoundReference(sort: Int, paramIndex: Int, boundIndex: Int): TypeReference
Returns a reference to a type parameter bound of a generic class or method. |
|
open static fun newTypeParameterReference(sort: Int, paramIndex: Int): TypeReference
Returns a reference to a type parameter of a generic class or method. |
|
open static fun newTypeReference(sort: Int): TypeReference
Returns a type reference of the given sort. |