Top Description Fields Constructors Methods
org.eclipse.persistence.internal.libraries.asm.tree

public abstract Class AbstractInsnNode

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.libraries.asm.tree.FieldInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.FrameNode, org.eclipse.persistence.internal.libraries.asm.tree.IincInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.InsnNode, org.eclipse.persistence.internal.libraries.asm.tree.IntInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.InvokeDynamicInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.JumpInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.LabelNode, org.eclipse.persistence.internal.libraries.asm.tree.LdcInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.LineNumberNode, org.eclipse.persistence.internal.libraries.asm.tree.LookupSwitchInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.MethodInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.MultiANewArrayInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.TableSwitchInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.TypeInsnNode, org.eclipse.persistence.internal.libraries.asm.tree.VarInsnNode
Imports
java.util.ArrayList, .List, .Map, org.eclipse.persistence.internal.libraries.asm.MethodVisitor

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 Summary

Modifier and TypeField and Description
public static final int
FIELD_INSN

The type of FieldInsnNode instructions.

public static final int
FRAME

The type of FrameNode "instructions".

public static final int
IINC_INSN

The type of IincInsnNode instructions.

pack-priv int
index

The index of this instruction in the list to which it belongs.

public static final int
INSN

The type of InsnNode instructions.

public static final int
INT_INSN

The type of IntInsnNode instructions.

public List<TypeAnnotationNode>
invisibleTypeAnnotations

The runtime invisible type annotations of this instruction.

public static final int
INVOKE_DYNAMIC_INSN

The type of InvokeDynamicInsnNode instructions.

public static final int
JUMP_INSN

The type of JumpInsnNode instructions.

public static final int
LABEL

The type of LabelNode "instructions".

public static final int
LDC_INSN

The type of LdcInsnNode instructions.

public static final int
LINE

The type of LineNumberNode "instructions".

public static final int
LOOKUPSWITCH_INSN

The type of LookupSwitchInsnNode instructions.

public static final int
METHOD_INSN

The type of MethodInsnNode instructions.

public static final int
pack-priv AbstractInsnNode
nextInsn

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

protected int
opcode

The opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or a line number).

pack-priv AbstractInsnNode
previousInsn

The previous instruction in the list to which this instruction belongs.

public static final int
TABLESWITCH_INSN

The type of TableSwitchInsnNode instructions.

public static final int
TYPE_INSN

The type of TypeInsnNode instructions.

public static final int
VAR_INSN

The type of VarInsnNode instructions.

public List<TypeAnnotationNode>
visibleTypeAnnotations

The runtime visible type annotations of this instruction.

Constructor Summary

AccessConstructor and Description
protected
AbstractInsnNode(final int
the opcode of the instruction to be constructed.
opcode
)

Constructs a new AbstractInsnNode.

Method Summary

Modifier and TypeMethod and Description
public abstract void
accept(MethodVisitor
a method visitor.
methodVisitor
)

Makes the given method visitor visit this instruction.

protected final void
acceptAnnotations(final MethodVisitor
a method visitor.
methodVisitor
)

Makes the given visitor visit the annotations of this instruction.

public abstract AbstractInsnNode

Returns:

a copy of this instruction. The returned instruction does not belong to any InsnList.
clone
(Map<LabelNode, LabelNode>
a map from LabelNodes to cloned LabelNodes.
clonedLabels
)

Returns a copy of this instruction.

pack-priv static LabelNode

Returns:

the clone of the given label.
clone
(final LabelNode
a label.
label
,
final Map<LabelNode, LabelNode>
a map from LabelNodes to cloned LabelNodes.
clonedLabels
)

Returns the clone of the given label.

pack-priv static LabelNode[]

Returns:

the clones of the given labels.
clone
(final List<LabelNode>
a list of labels.
labels
,
final Map<LabelNode, LabelNode>
a map from LabelNodes to cloned LabelNodes.
clonedLabels
)

Returns the clones of the given labels.

protected final AbstractInsnNode

Returns:

this instruction.
cloneAnnotations
(final AbstractInsnNode
the source instruction.
insnNode
)

Clones the annotations of the given instruction into this instruction.

public AbstractInsnNode

Returns:

the next 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.

public int

Returns:

the opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or a line number).
getOpcode
()

Returns the opcode of this instruction.

public AbstractInsnNode

Returns:

the previous instruction in the list to which this instruction belongs, if any. May be null.
getPrevious
()

Returns the previous instruction in the list to which this instruction belongs, if any.

public abstract int

Returns:

the type of this instruction, i.e. one the constants defined in this class.
getType
()

Returns the type of this instruction.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FIELD_INSNback to summary
public static final int FIELD_INSN

The type of FieldInsnNode instructions.

FRAMEback to summary
public static final int FRAME

The type of FrameNode "instructions".

IINC_INSNback to summary
public static final int IINC_INSN

The type of IincInsnNode instructions.

indexback to summary
pack-priv 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.

INSNback to summary
public static final int INSN

The type of InsnNode instructions.

INT_INSNback to summary
public static final int INT_INSN

The type of IntInsnNode instructions.

invisibleTypeAnnotationsback to summary
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.

INVOKE_DYNAMIC_INSNback to summary
public static final int INVOKE_DYNAMIC_INSN

The type of InvokeDynamicInsnNode instructions.

JUMP_INSNback to summary
public static final int JUMP_INSN

The type of JumpInsnNode instructions.

LABELback to summary
public static final int LABEL

The type of LabelNode "instructions".

LDC_INSNback to summary
public static final int LDC_INSN

The type of LdcInsnNode instructions.

LINEback to summary
public static final int LINE

The type of LineNumberNode "instructions".

LOOKUPSWITCH_INSNback to summary
public static final int LOOKUPSWITCH_INSN

The type of LookupSwitchInsnNode instructions.

METHOD_INSNback to summary
public static final int METHOD_INSN

The type of MethodInsnNode instructions.

MULTIANEWARRAY_INSNback to summary
public static final int MULTIANEWARRAY_INSN

The type of MultiANewArrayInsnNode instructions.

nextInsnback to summary
pack-priv AbstractInsnNode nextInsn

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

opcodeback to summary
protected int opcode

The opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or a line number).

previousInsnback to summary
pack-priv AbstractInsnNode previousInsn

The previous instruction in the list to which this instruction belongs.

TABLESWITCH_INSNback to summary
public static final int TABLESWITCH_INSN

The type of TableSwitchInsnNode instructions.

TYPE_INSNback to summary
public static final int TYPE_INSN

The type of TypeInsnNode instructions.

VAR_INSNback to summary
public static final int VAR_INSN

The type of VarInsnNode instructions.

visibleTypeAnnotationsback to summary
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.

Constructor Detail

AbstractInsnNodeback to summary
protected AbstractInsnNode(final int opcode)

Constructs a new AbstractInsnNode.

Parameters
opcode:int

the opcode of the instruction to be constructed.

Method Detail

acceptback to summary
public abstract void accept(MethodVisitor methodVisitor)

Makes the given method visitor visit this instruction.

Parameters
methodVisitor:MethodVisitor

a method visitor.

acceptAnnotationsback to summary
protected final void acceptAnnotations(final MethodVisitor methodVisitor)

Makes the given visitor visit the annotations of this instruction.

Parameters
methodVisitor:MethodVisitor

a method visitor.

cloneback to summary
public abstract AbstractInsnNode clone(Map<LabelNode, LabelNode> clonedLabels)

Returns a copy of this instruction.

Parameters
clonedLabels:Map<LabelNode, LabelNode>

a map from LabelNodes to cloned LabelNodes.

Returns:AbstractInsnNode

a copy of this instruction. The returned instruction does not belong to any InsnList.

cloneback to summary
pack-priv static LabelNode clone(final LabelNode label, final Map<LabelNode, LabelNode> clonedLabels)

Returns the clone of the given label.

Parameters
label:LabelNode

a label.

clonedLabels:Map<LabelNode, LabelNode>

a map from LabelNodes to cloned LabelNodes.

Returns:LabelNode

the clone of the given label.

cloneback to summary
pack-priv static LabelNode[] clone(final List<LabelNode> labels, final Map<LabelNode, LabelNode> clonedLabels)

Returns the clones of the given labels.

Parameters
labels:List<LabelNode>

a list of labels.

clonedLabels:Map<LabelNode, LabelNode>

a map from LabelNodes to cloned LabelNodes.

Returns:LabelNode[]

the clones of the given labels.

cloneAnnotationsback to summary
protected final AbstractInsnNode cloneAnnotations(final AbstractInsnNode insnNode)

Clones the annotations of the given instruction into this instruction.

Parameters
insnNode:AbstractInsnNode

the source instruction.

Returns:AbstractInsnNode

this instruction.

getNextback to summary
public AbstractInsnNode getNext()

Returns the next instruction in the list to which this instruction belongs, if any.

Returns:AbstractInsnNode

the next instruction in the list to which this instruction belongs, if any. May be null.

getOpcodeback to summary
public int getOpcode()

Returns the opcode of this instruction.

Returns:int

the opcode of this instruction, or -1 if this is not a JVM instruction (e.g. a label or a line number).

getPreviousback to summary
public AbstractInsnNode getPrevious()

Returns the previous instruction in the list to which this instruction belongs, if any.

Returns:AbstractInsnNode

the previous instruction in the list to which this instruction belongs, if any. May be null.

getTypeback to summary
public abstract int getType()

Returns the type of this instruction.

Returns:int

the type of this instruction, i.e. one the constants defined in this class.