Class AbstractInsnNode

java.lang.Object
org.objectweb.asm.tree.AbstractInsnNode
Direct Known Subclasses:
FieldInsnNode, FrameNode, IincInsnNode, InsnNode, IntInsnNode, 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.
Author:
Eric Bruneton
  • Field Details

  • Constructor Details

    • AbstractInsnNode

      protected AbstractInsnNode(int opcode)
      Constructs a new AbstractInsnNode.
      Parameters:
      opcode - the opcode of the instruction to be constructed.
  • Method Details

    • getOpcode

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

      public abstract int getType()
      Returns the type of this instruction.
      Returns:
      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.
      Returns:
      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.
      Returns:
      the next instruction in the list to which this instruction belongs, if any. May be null.
    • accept

      public abstract void accept(MethodVisitor cv)
      Makes the given code visitor visit this instruction.
      Parameters:
      cv - a code visitor.
    • clone

      public abstract AbstractInsnNode clone(Map labels)
      Returns a copy of this instruction.
      Parameters:
      labels - a map from LabelNodes to cloned LabelNodes.
      Returns:
      a copy of this instruction. The returned instruction does not belong to any InsnList.