This interface contains shareable instruction objects.
In order to save memory you can use some instructions multiply,
since they have an immutable state and are directly derived from
Instruction. I.e. they have no instance fields that could be
changed. Since some of these instructions like ICONST_0 occur
very frequently this can save a lot of time and space. This
feature is an adaptation of the FlyWeight design pattern, we
just use an array instead of a factory.
The Instructions can also accessed directly under their names, so
it's possible to write il.append(Instruction.ICONST_0);
INSTRUCTIONS
public static final Instruction[] INSTRUCTIONS
Get object via its opcode, for immutable instructions like
branch instructions entries are set to null.
MONITORENTER
public static final Instruction MONITORENTER
NOP
public static final Instruction NOP
Predefined instruction objects
THIS
public static final LocalVariableInstruction THIS
You can use these constants in multiple places safely, if you can guarantee
that you will never alter their internal values, e.g. call setIndex().
bla
public static final InstructionConstants.Clinit bla
Interfaces may have no static initializers, so we simulate this
with an inner class.