类 AbstractInsnNode

java.lang.Object
cn.taketoday.bytecode.tree.AbstractInsnNode
直接已知子类:
FieldInsnNode, FrameNode, IincInsnNode, InsnNode, IntInsnNode, InvokeDynamicInsnNode, JumpInsnNode, LabelNode, LdcInsnNode, LineNumberNode, LookupSwitchInsnNode, MethodInsnNode, MultiANewArrayInsnNode, TableSwitchInsnNode, TypeInsnNode, VarInsnNode

public abstract class AbstractInsnNode extends Object
A node that represents a bytecode instruction. An instruction can appear at most once in at most one InsnList at a time.
作者:
Eric Bruneton
  • 字段详细资料

    • INSN

      public static final int INSN
      The type of InsnNode instructions.
      另请参阅:
    • INT_INSN

      public static final int INT_INSN
      The type of IntInsnNode instructions.
      另请参阅:
    • VAR_INSN

      public static final int VAR_INSN
      The type of VarInsnNode instructions.
      另请参阅:
    • TYPE_INSN

      public static final int TYPE_INSN
      The type of TypeInsnNode instructions.
      另请参阅:
    • FIELD_INSN

      public static final int FIELD_INSN
      The type of FieldInsnNode instructions.
      另请参阅:
    • METHOD_INSN

      public static final int METHOD_INSN
      The type of MethodInsnNode instructions.
      另请参阅:
    • INVOKE_DYNAMIC_INSN

      public static final int INVOKE_DYNAMIC_INSN
      The type of InvokeDynamicInsnNode instructions.
      另请参阅:
    • JUMP_INSN

      public static final int JUMP_INSN
      The type of JumpInsnNode instructions.
      另请参阅:
    • LABEL

      public static final int LABEL
      The type of LabelNode "instructions".
      另请参阅:
    • LDC_INSN

      public static final int LDC_INSN
      The type of LdcInsnNode instructions.
      另请参阅:
    • IINC_INSN

      public static final int IINC_INSN
      The type of IincInsnNode instructions.
      另请参阅:
    • TABLESWITCH_INSN

      public static final int TABLESWITCH_INSN
      The type of TableSwitchInsnNode instructions.
      另请参阅:
    • LOOKUPSWITCH_INSN

      public static final int LOOKUPSWITCH_INSN
      The type of LookupSwitchInsnNode instructions.
      另请参阅:
    • MULTIANEWARRAY_INSN

      public static final int MULTIANEWARRAY_INSN
      The type of MultiANewArrayInsnNode instructions.
      另请参阅:
    • FRAME

      public static final int FRAME
      The type of FrameNode "instructions".
      另请参阅:
    • LINE

      public static final int LINE
      The type of LineNumberNode "instructions".
      另请参阅:
    • opcode

      protected int opcode
      The opcode of this instruction.
    • visibleTypeAnnotations

      public List<TypeAnnotationNode> visibleTypeAnnotations
      The runtime visible type annotations of this instruction. This field is only used for real instructions (i.e. not for labels, frames, or line number nodes). This list is a list of TypeAnnotationNode objects. May be null.
    • invisibleTypeAnnotations

      public List<TypeAnnotationNode> invisibleTypeAnnotations
      The runtime invisible type annotations of this instruction. This field is only used for real instructions (i.e. not for labels, frames, or line number nodes). This list is a list of TypeAnnotationNode objects. May be null.
    • previousInsn

      AbstractInsnNode previousInsn
      The previous instruction in the list to which this instruction belongs.
    • nextInsn

      The next instruction in the list to which this instruction belongs.
    • index

      int index
      The index of this instruction in the list to which it belongs. The value of this field is correct only when InsnList.cache is not null. A value of -1 indicates that this instruction does not belong to any InsnList.
  • 构造器详细资料

    • AbstractInsnNode

      protected AbstractInsnNode(int opcode)
      Constructs a new AbstractInsnNode.
      参数:
      opcode - the opcode of the instruction to be constructed.
  • 方法详细资料

    • getOpcode

      public int getOpcode()
      Returns the opcode of this instruction.
      返回:
      the opcode of this instruction.
    • getType

      public abstract int getType()
      Returns the type of this instruction.
      返回:
      the type of this instruction, i.e. one the constants defined in this class.
    • getPrevious

      public AbstractInsnNode getPrevious()
      Returns the previous instruction in the list to which this instruction belongs, if any.
      返回:
      the previous instruction in the list to which this instruction belongs, if any. May be null.
    • getNext

      public AbstractInsnNode getNext()
      Returns the next instruction in the list to which this instruction belongs, if any.
      返回:
      the next instruction in the list to which this instruction belongs, if any. May be null.
    • accept

      public abstract void accept(MethodVisitor methodVisitor)
      Makes the given method visitor visit this instruction.
      参数:
      methodVisitor - a method visitor.
    • acceptAnnotations

      protected final void acceptAnnotations(MethodVisitor methodVisitor)
      Makes the given visitor visit the annotations of this instruction.
      参数:
      methodVisitor - a method visitor.
    • clone

      public abstract AbstractInsnNode clone(Map<LabelNode,LabelNode> clonedLabels)
      Returns a copy of this instruction.
      参数:
      clonedLabels - a map from LabelNodes to cloned LabelNodes.
      返回:
      a copy of this instruction. The returned instruction does not belong to any InsnList.
    • clone

      static LabelNode clone(LabelNode label, Map<LabelNode,LabelNode> clonedLabels)
      Returns the clone of the given label.
      参数:
      label - a label.
      clonedLabels - a map from LabelNodes to cloned LabelNodes.
      返回:
      the clone of the given label.
    • clone

      static LabelNode[] clone(List<LabelNode> labels, Map<LabelNode,LabelNode> clonedLabels)
      Returns the clones of the given labels.
      参数:
      labels - a list of labels.
      clonedLabels - a map from LabelNodes to cloned LabelNodes.
      返回:
      the clones of the given labels.
    • cloneAnnotations

      protected final AbstractInsnNode cloneAnnotations(AbstractInsnNode insnNode)
      Clones the annotations of the given instruction into this instruction.
      参数:
      insnNode - the source instruction.
      返回:
      this instruction.