Class TypeAnnotationNode

Direct Known Subclasses:
LocalVariableAnnotationNode

public class TypeAnnotationNode extends AnnotationNode
A node that represents a type annotation.
  • Field Details

    • typeRef

      public int typeRef
      A reference to the annotated type. See TypeReference.
    • typePath

      public TypePath typePath
      The path to the annotated type argument, wildcard bound, array element type, or static outer type within the referenced type. May be null if the annotation targets 'typeRef' as a whole.
  • Constructor Details

    • TypeAnnotationNode

      public TypeAnnotationNode(int typeRef, TypePath typePath, String descriptor)
      Constructs a new AnnotationNode. Subclasses must not use this constructor. Instead, they must use the TypeAnnotationNode(int, int, TypePath, String) version.
      Parameters:
      typeRef - a reference to the annotated type. See TypeReference.
      typePath - the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be null if the annotation targets 'typeRef' as a whole.
      descriptor - the class descriptor of the annotation class.
      Throws:
      IllegalStateException - If a subclass calls this constructor.
    • TypeAnnotationNode

      public TypeAnnotationNode(int api, int typeRef, TypePath typePath, String descriptor)
      Constructs a new AnnotationNode.
      Parameters:
      api - the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.
      typeRef - a reference to the annotated type. See TypeReference.
      typePath - the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be null if the annotation targets 'typeRef' as a whole.
      descriptor - the class descriptor of the annotation class.