org.objectweb.asm.tree

Class AbstractInsnNode

Known Direct Subclasses:
FieldInsnNode, IincInsnNode, InsnNode, IntInsnNode, JumpInsnNode, LabelNode, LdcInsnNode, LookupSwitchInsnNode, MethodInsnNode, MultiANewArrayInsnNode, TableSwitchInsnNode, TypeInsnNode, VarInsnNode

public abstract class AbstractInsnNode
extends Object

A node that represents a bytecode instruction.

Author:
Eric Bruneton

Field Summary

static int
FIELD_INSN
The type of FieldInsnNode instructions.
static int
IINC_INSN
The type of IincInsnNode instructions.
static int
INSN
The type of InsnNode instructions.
static int
INT_INSN
The type of IntInsnNode instructions.
static int
JUMP_INSN
The type of JumpInsnNode instructions.
static int
LABEL
The type of LabelNode "instructions".
static int
LDC_INSN
The type of LdcInsnNode instructions.
static int
LOOKUPSWITCH_INSN
The type of LookupSwitchInsnNode instructions.
static int
METHOD_INSN
The type of MethodInsnNode instructions.
static int
MULTIANEWARRAY_INSN
The type of MultiANewArrayInsnNode instructions.
static int
TABLESWITCH_INSN
The type of TableSwitchInsnNode instructions.
static int
TYPE_INSN
The type of TypeInsnNode instructions.
static int
VAR_INSN
The type of VarInsnNode instructions.
protected int
opcode
The opcode of this instruction.

Constructor Summary

AbstractInsnNode(int opcode)
Constructs a new AbstractInsnNode.

Method Summary

void
accept(MethodVisitor cv)
Makes the given code visitor visit this instruction.
int
getOpcode()
Returns the opcode of this instruction.
int
getType()
Returns the type of this instruction.

Field Details

FIELD_INSN

public static final int FIELD_INSN

Field Value:
4


IINC_INSN

public static final int IINC_INSN

Field Value:
9


INSN

public static final int INSN
The type of InsnNode instructions.

Field Value:
0


INT_INSN

public static final int INT_INSN

Field Value:
1


JUMP_INSN

public static final int JUMP_INSN

Field Value:
6


LABEL

public static final int LABEL
The type of LabelNode "instructions".

Field Value:
7


LDC_INSN

public static final int LDC_INSN

Field Value:
8


LOOKUPSWITCH_INSN

public static final int LOOKUPSWITCH_INSN

Field Value:
11


METHOD_INSN

public static final int METHOD_INSN

Field Value:
5


MULTIANEWARRAY_INSN

public static final int MULTIANEWARRAY_INSN

Field Value:
12


TABLESWITCH_INSN

public static final int TABLESWITCH_INSN

Field Value:
10


TYPE_INSN

public static final int TYPE_INSN

Field Value:
3


VAR_INSN

public static final int VAR_INSN

Field Value:
2


opcode

protected int opcode
The opcode of this instruction.

Constructor Details

AbstractInsnNode

protected AbstractInsnNode(int opcode)

Parameters:
opcode - the opcode of the instruction to be constructed.

Method Details

accept

public void accept(MethodVisitor cv)
Makes the given code visitor visit this instruction.

Parameters:
cv - a code visitor.


getOpcode

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

Returns:
the opcode of this instruction.


getType

public int getType()
Returns the type of this instruction.

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