Class LocalVariableAnnotationNode


public class LocalVariableAnnotationNode extends TypeAnnotationNode
A node that represents a type annotation on a local or resource variable.
  • Field Details

    • start

      public List<LabelNode> start
      The fist instructions corresponding to the continuous ranges that make the scope of this local variable (inclusive). Must not be null.
    • end

      public List<LabelNode> end
      The last instructions corresponding to the continuous ranges that make the scope of this local variable (exclusive). This list must have the same size as the 'start' list. Must not be null.
    • index

      public List<Integer> index
      The local variable's index in each range. This list must have the same size as the 'start' list. Must not be null.
  • Constructor Details

    • LocalVariableAnnotationNode

      public LocalVariableAnnotationNode(int typeRef, TypePath typePath, LabelNode[] start, LabelNode[] end, int[] index, String descriptor)
      Constructs a new LocalVariableAnnotationNode. Subclasses must not use this constructor. Instead, they must use the LocalVariableAnnotationNode(int, TypePath, LabelNode[], LabelNode[], int[], 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.
      start - the fist instructions corresponding to the continuous ranges that make the scope of this local variable (inclusive).
      end - the last instructions corresponding to the continuous ranges that make the scope of this local variable (exclusive). This array must have the same size as the 'start' array.
      index - the local variable's index in each range. This array must have the same size as the 'start' array.
      descriptor - the class descriptor of the annotation class.
    • LocalVariableAnnotationNode

      public LocalVariableAnnotationNode(int api, int typeRef, TypePath typePath, LabelNode[] start, LabelNode[] end, int[] index, String descriptor)
      Constructs a new LocalVariableAnnotationNode.
      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.
      start - the fist instructions corresponding to the continuous ranges that make the scope of this local variable (inclusive).
      end - the last instructions corresponding to the continuous ranges that make the scope of this local variable (exclusive). This array must have the same size as the 'start' array.
      index - the local variable's index in each range. This array must have the same size as the 'start' array.
      descriptor - the class descriptor of the annotation class.
  • Method Details

    • accept

      public void accept(MethodVisitor methodVisitor, boolean visible)
      Makes the given visitor visit this type annotation.
      Parameters:
      methodVisitor - the visitor that must visit this annotation.
      visible - true if the annotation is visible at runtime.