Class BytecodeMethod
java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeMethod
- All Implemented Interfaces:
Testable
Bytecode method.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionBytecodeMethod(BytecodeMethodProperties properties, CustomClassWriter visitor, BytecodeClass clazz, int stack, int locals) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionannotation(BytecodeAnnotation annotation) Add annotation.defvalue(BytecodeDefaultValue defvalue) Add default value.entry(BytecodeEntry entry) Add some bytecode entry.label(org.objectweb.asm.Label label) Add label.Add instruction.testCode()Generate test Java code.trycatch(BytecodeEntry entry) Add try-catch block.up()Return to the original class.
-
Constructor Details
-
BytecodeMethod
public BytecodeMethod(BytecodeMethodProperties properties, CustomClassWriter visitor, BytecodeClass clazz, int stack, int locals) Constructor.- Parameters:
properties- Method properties.visitor- ASM class writer.clazz- Original class.stack- Stack size.locals- Local variables.
-
-
Method Details
-
up
Return to the original class.- Returns:
- Original class.
-
label
Add label.- Parameters:
label- Label.- Returns:
- This object.
-
opcode
Add instruction.- Parameters:
opcode- Opcode.args- Arguments.- 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.
-
annotation
Add annotation.- Parameters:
annotation- Annotation.- Returns:
- This object.
-
defvalue
Add default value.- Parameters:
defvalue- Default value.- Returns:
- This object.
-
testCode
Description copied from interface:TestableGenerate test Java code.
-