Class InstructionConst

java.lang.Object
org.apache.bcel.generic.InstructionConst

public final class InstructionConst extends Object
Contains shareable instruction objects.

Reusing predefined instruction objects can save time and memory, especially for frequently used instructions such as ICONST_0. These objects are shared and should not be modified. This approach adapts the Flyweight design pattern by using an array instead of a factory.

The instruction objects can also be accessed directly by name, for example, il.append(InstructionConst.ICONST_0).