Class BytecodeInstruction

java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeInstruction
All Implemented Interfaces:
BytecodeEntry, Testable

public final class BytecodeInstruction extends Object implements BytecodeEntry
Bytecode instruction.
Since:
0.1
  • Constructor Details

    • BytecodeInstruction

      public BytecodeInstruction(int opcode, Object... args)
      Constructor.
      Parameters:
      opcode - Opcode.
      args - Arguments.
    • BytecodeInstruction

      public BytecodeInstruction(int opcode, List<Object> args)
      Constructor.
      Parameters:
      opcode - Opcode.
      args - Arguments.
  • Method Details

    • writeTo

      public void writeTo(org.objectweb.asm.MethodVisitor visitor)
      Description copied from interface: BytecodeEntry
      Write instruction to the method visitor.
      Specified by:
      writeTo in interface BytecodeEntry
      Parameters:
      visitor - Method visitor.
    • directives

      public Iterable<org.xembly.Directive> directives(boolean counting)
      Specified by:
      directives in interface BytecodeEntry
    • isLabel

      public boolean isLabel()
      Specified by:
      isLabel in interface BytecodeEntry
    • isOpcode

      public boolean isOpcode()
      Specified by:
      isOpcode in interface BytecodeEntry
    • testCode

      public String testCode()
      Description copied from interface: Testable
      Generate test Java code.
      Specified by:
      testCode in interface Testable
      Returns:
      Java code.
    • impact

      public int impact()
      Impact of each instruction on the stack.
      Specified by:
      impact in interface BytecodeEntry
      Returns:
      Stack impact.