Class BytecodeMethodBuilder
- java.lang.Object
-
- org.eolang.jeo.representation.bytecode.BytecodeMethodBuilder
-
public final class BytecodeMethodBuilder extends Object
Bytecode method builder.- Since:
- 0.6
-
-
Constructor Summary
Constructors Constructor Description BytecodeMethodBuilder(BytecodeClass clazz, BytecodeMethod method)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BytecodeMethodBuilder
label()
BytecodeMethodBuilder
label(String uid)
Add label.BytecodeMethodBuilder
opcode(int opcode, Object... args)
Add instruction.BytecodeMethodBuilder
trycatch(BytecodeEntry entry)
Add try-catch block.BytecodeClass
up()
Return to the original class.
-
-
-
Constructor Detail
-
BytecodeMethodBuilder
public BytecodeMethodBuilder(BytecodeClass clazz, BytecodeMethod method)
Constructor.- Parameters:
clazz
- Class.method
- Method.
-
-
Method Detail
-
up
public BytecodeClass up()
Return to the original class.- Returns:
- Original class.
- Suppressed Checkstyle violations:
- MethodNameCheck (3 lines)
-
label
public BytecodeMethodBuilder label()
-
label
public BytecodeMethodBuilder label(String uid)
Add label.- Parameters:
uid
- Label uid.- 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.
-
-