Class BytecodeMethod
java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeMethod
Bytecode method.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for tests.BytecodeMethod
(String name) Constructor.BytecodeMethod
(String name, BytecodeAnnotations annotations) Constructor.BytecodeMethod
(String name, BytecodeMaxs maxs) Constructor.BytecodeMethod
(List<BytecodeEntry> tryblocks, List<BytecodeEntry> instructions, BytecodeAnnotations annotations, BytecodeMethodProperties properties, List<BytecodeDefaultValue> defvalues, BytecodeMaxs maxs) Constructor.BytecodeMethod
(BytecodeEntry... instructions) Constructor.BytecodeMethod
(BytecodeMethodProperties properties, BytecodeMaxs maxs) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondefvalue
(BytecodeDefaultValue defvalue) Add default value.directives
(boolean counting) Generate directives.entry
(BytecodeEntry entry) Add some bytecode entry.label
(org.objectweb.asm.Label label) Add label.name()
Method name.trycatch
(BytecodeEntry entry) Add try-catch block.Similar method without maxs.
-
Constructor Details
-
BytecodeMethod
public BytecodeMethod()Constructor for tests. -
BytecodeMethod
Constructor.- Parameters:
name
- Method name.
-
BytecodeMethod
Constructor.- Parameters:
instructions
- Method instructions.
-
BytecodeMethod
Constructor.- Parameters:
name
- Method name.annotations
- Method annotations.
-
BytecodeMethod
Constructor.- Parameters:
name
- Method name.maxs
- Max stack and locals.
-
BytecodeMethod
Constructor.- Parameters:
properties
- Method properties.maxs
- Max stack and locals.
-
BytecodeMethod
public BytecodeMethod(List<BytecodeEntry> tryblocks, List<BytecodeEntry> instructions, BytecodeAnnotations annotations, BytecodeMethodProperties properties, List<BytecodeDefaultValue> defvalues, BytecodeMaxs maxs) Constructor.- Parameters:
tryblocks
- Try-catch blocks.instructions
- Method instructions.annotations
- Method annotations.properties
- Method properties.defvalues
- Default values.maxs
- Max stack and locals.
-
-
Method Details
-
withoutMaxs
Similar method without maxs.- Returns:
- Method without maxs.
-
label
Add label.- Parameters:
label
- Label.- Returns:
- This object.
-
trycatch
Add try-catch block.- Parameters:
entry
- Try-catch block.- Returns:
- This object.
-
entry
Add some bytecode entry.- Parameters:
entry
- Entry.- Returns:
- This object.
-
defvalue
Add default value.- Parameters:
defvalue
- Default value.- Returns:
- This object.
-
name
Method name.- Returns:
- Method name.
-
directives
Generate directives.- Parameters:
counting
- Whether to count opcodes.- Returns:
- Directives.
-