Interface InstructionConstants

All Known Implementing Classes:
InstructionFactory, PUSH

Deprecated.
(since 6.0) Do not use. Use InstructionConst instead.
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).