Module org.eclipse.persistence.asm
Class AbstractInsnNode
java.lang.Object
org.eclipse.persistence.internal.libraries.asm.tree.AbstractInsnNode
- Direct Known Subclasses:
FieldInsnNode
,FrameNode
,IincInsnNode
,InsnNode
,IntInsnNode
,InvokeDynamicInsnNode
,JumpInsnNode
,LabelNode
,LdcInsnNode
,LineNumberNode
,LookupSwitchInsnNode
,MethodInsnNode
,MultiANewArrayInsnNode
,TableSwitchInsnNode
,TypeInsnNode
,VarInsnNode
A node that represents a bytecode instruction. An instruction can appear at most once in at
most one
InsnList
at a time.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The type ofFieldInsnNode
instructions.static final int
The type ofFrameNode
"instructions".static final int
The type ofIincInsnNode
instructions.static final int
The type ofInsnNode
instructions.static final int
The type ofIntInsnNode
instructions.The runtime invisible type annotations of this instruction.static final int
The type ofInvokeDynamicInsnNode
instructions.static final int
The type ofJumpInsnNode
instructions.static final int
The type ofLabelNode
"instructions".static final int
The type ofLdcInsnNode
instructions.static final int
The type ofLineNumberNode
"instructions".static final int
The type ofLookupSwitchInsnNode
instructions.static final int
The type ofMethodInsnNode
instructions.static final int
The type ofMultiANewArrayInsnNode
instructions.protected int
The opcode of this instruction, or -1 if this is not a JVM instruction (e.g.static final int
The type ofTableSwitchInsnNode
instructions.static final int
The type ofTypeInsnNode
instructions.static final int
The type ofVarInsnNode
instructions.The runtime visible type annotations of this instruction. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractInsnNode
(int opcode) Constructs a newAbstractInsnNode
. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
accept
(MethodVisitor methodVisitor) Makes the given method visitor visit this instruction.protected final void
acceptAnnotations
(MethodVisitor methodVisitor) Makes the given visitor visit the annotations of this instruction.abstract AbstractInsnNode
Returns a copy of this instruction.protected final AbstractInsnNode
cloneAnnotations
(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.int
Returns the opcode of this instruction.Returns the previous instruction in the list to which this instruction belongs, if any.abstract int
getType()
Returns the type of this instruction.
-
Field Details
-
INSN
public static final int INSNThe type ofInsnNode
instructions.- See Also:
-
INT_INSN
public static final int INT_INSNThe type ofIntInsnNode
instructions.- See Also:
-
VAR_INSN
public static final int VAR_INSNThe type ofVarInsnNode
instructions.- See Also:
-
TYPE_INSN
public static final int TYPE_INSNThe type ofTypeInsnNode
instructions.- See Also:
-
FIELD_INSN
public static final int FIELD_INSNThe type ofFieldInsnNode
instructions.- See Also:
-
METHOD_INSN
public static final int METHOD_INSNThe type ofMethodInsnNode
instructions.- See Also:
-
INVOKE_DYNAMIC_INSN
public static final int INVOKE_DYNAMIC_INSNThe type ofInvokeDynamicInsnNode
instructions.- See Also:
-
JUMP_INSN
public static final int JUMP_INSNThe type ofJumpInsnNode
instructions.- See Also:
-
LABEL
public static final int LABELThe type ofLabelNode
"instructions".- See Also:
-
LDC_INSN
public static final int LDC_INSNThe type ofLdcInsnNode
instructions.- See Also:
-
IINC_INSN
public static final int IINC_INSNThe type ofIincInsnNode
instructions.- See Also:
-
TABLESWITCH_INSN
public static final int TABLESWITCH_INSNThe type ofTableSwitchInsnNode
instructions.- See Also:
-
LOOKUPSWITCH_INSN
public static final int LOOKUPSWITCH_INSNThe type ofLookupSwitchInsnNode
instructions.- See Also:
-
MULTIANEWARRAY_INSN
public static final int MULTIANEWARRAY_INSNThe type ofMultiANewArrayInsnNode
instructions.- See Also:
-
FRAME
public static final int FRAMEThe type ofFrameNode
"instructions".- See Also:
-
LINE
public static final int LINEThe type ofLineNumberNode
"instructions".- See Also:
-
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 ofTypeAnnotationNode
objects. 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 ofTypeAnnotationNode
objects. 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
Makes the given method visitor visit this instruction.- Parameters:
methodVisitor
- a method visitor.
-
acceptAnnotations
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.
-