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
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(MethodVisitor methodVisitor) Makes the given method visitor visit this instruction.protected final voidacceptAnnotations(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
public static final int INSNThe type ofInsnNodeinstructions.- See Also:
-
INT_INSN
public static final int INT_INSNThe type ofIntInsnNodeinstructions.- See Also:
-
VAR_INSN
public static final int VAR_INSNThe type ofVarInsnNodeinstructions.- See Also:
-
TYPE_INSN
public static final int TYPE_INSNThe type ofTypeInsnNodeinstructions.- See Also:
-
FIELD_INSN
public static final int FIELD_INSNThe type ofFieldInsnNodeinstructions.- See Also:
-
METHOD_INSN
public static final int METHOD_INSNThe type ofMethodInsnNodeinstructions.- See Also:
-
INVOKE_DYNAMIC_INSN
public static final int INVOKE_DYNAMIC_INSNThe type ofInvokeDynamicInsnNodeinstructions.- See Also:
-
JUMP_INSN
public static final int JUMP_INSNThe type ofJumpInsnNodeinstructions.- See Also:
-
LABEL
public static final int LABELThe type ofLabelNode"instructions".- See Also:
-
LDC_INSN
public static final int LDC_INSNThe type ofLdcInsnNodeinstructions.- See Also:
-
IINC_INSN
public static final int IINC_INSNThe type ofIincInsnNodeinstructions.- See Also:
-
TABLESWITCH_INSN
public static final int TABLESWITCH_INSNThe type ofTableSwitchInsnNodeinstructions.- See Also:
-
LOOKUPSWITCH_INSN
public static final int LOOKUPSWITCH_INSNThe type ofLookupSwitchInsnNodeinstructions.- See Also:
-
MULTIANEWARRAY_INSN
public static final int MULTIANEWARRAY_INSNThe type ofMultiANewArrayInsnNodeinstructions.- 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 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
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.
-