Package org.eolang.jeo.representation
Class OpcodeDictionary
- java.lang.Object
-
- org.eolang.jeo.representation.OpcodeDictionary
-
public final class OpcodeDictionary extends Object
Opcode dictionary. This class provides a mapping between opcode numbers and their corresponding names, allowing for easy retrieval of opcode names by their numbers and vice versa.- Since:
- 0.12.0
-
-
Constructor Summary
Constructors Constructor Description OpcodeDictionary()
Constructor for creating an instance with default opcode names and codes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
code(String name)
Retrieves the opcode name for a given opcode number.String
name(int opcode)
Retrieves the opcode name for a given opcode number.
-
-
-
Method Detail
-
name
public String name(int opcode)
Retrieves the opcode name for a given opcode number.- Parameters:
opcode
- Opcode number- Returns:
- Name of the opcode
-
code
public int code(String name)
Retrieves the opcode name for a given opcode number.- Parameters:
name
- Name of the opcode- Returns:
- Opcode number corresponding to the name
-
-