Class BytecodeInstruction
java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeInstruction
- All Implemented Interfaces:
BytecodeEntry,Testable
Bytecode instruction.
- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionBytecodeInstruction(int opcode, Object... args) Constructor.BytecodeInstruction(int opcode, List<Object> args) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionIterable<org.xembly.Directive>directives(boolean counting) intimpact()Impact of each instruction on the stack.booleanisLabel()booleanisOpcode()testCode()Generate test Java code.voidwriteTo(org.objectweb.asm.MethodVisitor visitor) Write instruction to the method visitor.
-
Constructor Details
-
BytecodeInstruction
Constructor.- Parameters:
opcode- Opcode.args- Arguments.
-
BytecodeInstruction
Constructor.- Parameters:
opcode- Opcode.args- Arguments.
-
-
Method Details
-
writeTo
public void writeTo(org.objectweb.asm.MethodVisitor visitor) Description copied from interface:BytecodeEntryWrite instruction to the method visitor.- Specified by:
writeToin interfaceBytecodeEntry- Parameters:
visitor- Method visitor.
-
directives
- Specified by:
directivesin interfaceBytecodeEntry
-
isLabel
public boolean isLabel()- Specified by:
isLabelin interfaceBytecodeEntry
-
isOpcode
public boolean isOpcode()- Specified by:
isOpcodein interfaceBytecodeEntry
-
testCode
Description copied from interface:TestableGenerate test Java code. -
impact
public int impact()Impact of each instruction on the stack.- Specified by:
impactin interfaceBytecodeEntry- Returns:
- Stack impact.
-