Class BytecodeMethodBuilder

java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeMethodBuilder

public final class BytecodeMethodBuilder extends Object
Bytecode method builder.
Since:
0.6
  • Constructor Details

    • BytecodeMethodBuilder

      public BytecodeMethodBuilder(BytecodeClass clazz, BytecodeMethod method)
      Constructor.
      Parameters:
      clazz - Class.
      method - Method.
  • Method Details

    • up

      public BytecodeClass up()
      Return to the original class.
      Returns:
      Original class.
    • label

      public BytecodeMethodBuilder label(String uid)
      Add label.
      Parameters:
      uid - Label uid.
      Returns:
      This object.
    • label

      public BytecodeMethodBuilder label(org.objectweb.asm.Label label)
      Add label.
      Parameters:
      label - Label.
      Returns:
      This object.
    • opcode

      public BytecodeMethodBuilder opcode(int opcode, Object... args)
      Add instruction.
      Parameters:
      opcode - Opcode.
      args - Arguments.
      Returns:
      This object.
    • trycatch

      public BytecodeMethodBuilder trycatch(BytecodeEntry entry)
      Add try-catch block.
      Parameters:
      entry - Try-catch block.
      Returns:
      This object.