Class AbstractInsnNode
java.lang.Object
org.objectweb.asm.tree.AbstractInsnNode
- Direct Known Subclasses:
FieldInsnNode, FrameNode, IincInsnNode, InsnNode, IntInsnNode, InvokeDynamicInsnNode, JumpInsnNode, LabelNode, LdcInsnNode, LineNumberNode, LookupSwitchInsnNode, MethodInsnNode, MultiANewArrayInsnNode, TableSwitchInsnNode, TypeInsnNode, VarInsnNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe type ofFieldInsnNodeinstructions.static final intThe type ofFrameNode"instructions".static final intThe type ofIincInsnNodeinstructions.static final intThe type ofInsnNodeinstructions.static final intThe type ofIntInsnNodeinstructions.The runtime invisible type annotations of this instruction.static final intThe type ofInvokeDynamicInsnNodeinstructions.static final intThe type ofJumpInsnNodeinstructions.static final intThe type ofLabelNode"instructions".static final intThe type ofLdcInsnNodeinstructions.static final intThe type ofLineNumberNode"instructions".static final intThe type ofLookupSwitchInsnNodeinstructions.static final intThe type ofMethodInsnNodeinstructions.static final intThe type ofMultiANewArrayInsnNodeinstructions.protected intThe opcode of this instruction, or -1 if this is not a JVM instruction (e.g.static final intThe type ofTableSwitchInsnNodeinstructions.static final intThe type ofTypeInsnNodeinstructions.static final intThe type ofVarInsnNodeinstructions.The runtime visible type annotations of this instruction. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractInsnNode(int opcode) Constructs a newAbstractInsnNode. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaccept(org.objectweb.asm.MethodVisitor methodVisitor) Makes the given method visitor visit this instruction.protected final voidacceptAnnotations(org.objectweb.asm.MethodVisitor methodVisitor) Makes the given visitor visit the annotations of this instruction.abstract AbstractInsnNodeReturns a copy of this instruction.protected final AbstractInsnNodecloneAnnotations(AbstractInsnNode insnNode) Clones the annotations of the given instruction into this instruction.getNext()Returns the next instruction in the list to which this instruction belongs, if any.intReturns the opcode of this instruction.Returns the previous instruction in the list to which this instruction belongs, if any.abstract intgetType()Returns the type of this instruction.
-
Field Details
-
INSN
-
INT_INSN
-
VAR_INSN
-
TYPE_INSN
-
FIELD_INSN
-
METHOD_INSN
-
INVOKE_DYNAMIC_INSN
public static final int INVOKE_DYNAMIC_INSNThe type ofInvokeDynamicInsnNodeinstructions.- See Also:
-
JUMP_INSN
-
LABEL
-
LDC_INSN
-
IINC_INSN
-
TABLESWITCH_INSN
-
LOOKUPSWITCH_INSN
-
MULTIANEWARRAY_INSN
public static final int MULTIANEWARRAY_INSNThe type ofMultiANewArrayInsnNodeinstructions.- See Also:
-
FRAME
-
LINE
-
opcode
protected int opcodeThe opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or a line number). -
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 ofTypeAnnotationNodeobjects. May be null. -
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 ofTypeAnnotationNodeobjects. May be null.
-
-
Constructor Details
-
AbstractInsnNode
protected AbstractInsnNode(int opcode) Constructs a newAbstractInsnNode.- 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, or -1 if this is not a JVM instruction (e.g. a label or a line number).
-
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
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
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(org.objectweb.asm.MethodVisitor methodVisitor) Makes the given method visitor visit this instruction.- Parameters:
methodVisitor- a method visitor.
-
acceptAnnotations
protected final void acceptAnnotations(org.objectweb.asm.MethodVisitor methodVisitor) Makes the given visitor visit the annotations of this instruction.- Parameters:
methodVisitor- a method visitor.
-
clone
Returns a copy of this instruction.- Parameters:
clonedLabels- a map from LabelNodes to cloned LabelNodes.- Returns:
- a copy of this instruction. The returned instruction does not belong to any
InsnList.
-
cloneAnnotations
Clones the annotations of the given instruction into this instruction.- Parameters:
insnNode- the source instruction.- Returns:
- this instruction.
-