类 TypeReference


  • public class TypeReference
    extends Object
    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).
    作者:
    Eric Bruneton
    • 字段概要

      字段 
      修饰符和类型字段说明
      static intCAST
      The sort of type references that target the type declared in an explicit or implicit cast instruction.
      static intCLASS_EXTENDS
      The sort of type references that target the super class of a class or one of the interfaces it implements.
      static intCLASS_TYPE_PARAMETER
      The sort of type references that target a type parameter of a generic class.
      static intCLASS_TYPE_PARAMETER_BOUND
      The sort of type references that target a bound of a type parameter of a generic class.
      static intCONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
      The sort of type references that target a type parameter of a generic constructor in a constructor call.
      static intCONSTRUCTOR_REFERENCE
      The sort of type references that target the receiver type of a constructor reference.
      static intCONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
      The sort of type references that target a type parameter of a generic constructor in a constructor reference.
      static intEXCEPTION_PARAMETER
      The sort of type references that target the type of the exception of a 'catch' clause in a method.
      static intFIELD
      The sort of type references that target the type of a field.
      static intINSTANCEOF
      The sort of type references that target the type declared in an 'instanceof' instruction.
      static intLOCAL_VARIABLE
      The sort of type references that target the type of a local variable in a method.
      static intMETHOD_FORMAL_PARAMETER
      The sort of type references that target the type of a formal parameter of a method.
      static intMETHOD_INVOCATION_TYPE_ARGUMENT
      The sort of type references that target a type parameter of a generic method in a method call.
      static intMETHOD_RECEIVER
      The sort of type references that target the receiver type of a method.
      static intMETHOD_REFERENCE
      The sort of type references that target the receiver type of a method reference.
      static intMETHOD_REFERENCE_TYPE_ARGUMENT
      The sort of type references that target a type parameter of a generic method in a method reference.
      static intMETHOD_RETURN
      The sort of type references that target the return type of a method.
      static intMETHOD_TYPE_PARAMETER
      The sort of type references that target a type parameter of a generic method.
      static intMETHOD_TYPE_PARAMETER_BOUND
      The sort of type references that target a bound of a type parameter of a generic method.
      static intNEW
      The sort of type references that target the type of the object created by a 'new' instruction.
      static intRESOURCE_VARIABLE
      The sort of type references that target the type of a resource variable in a method.
      static intTHROWS
      The sort of type references that target the type of an exception declared in the throws clause of a method.
    • 构造器概要

      构造器 
      构造器说明
      TypeReference​(int typeRef)
      Creates a new TypeReference.