Interface BytecodeEntry
-
- All Known Implementing Classes:
BytecodeFrame,BytecodeInstruction,BytecodeLabel,BytecodeLine,BytecodeTryCatchBlock
public interface BytecodeEntryBytecode instruction or a label. Might be a label, a jump, a method call, etc.- Since:
- 0.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<org.xembly.Directive>directives(boolean counting)Convert entry to directives.intimpact()Impact of the instruction on the stack.booleanisIf()Is this instruction a conditional branch?booleanisJump()Is this instruction a goto? Is it a goto or jsr?booleanisLabel()Is this instruction a label?booleanisOpcode()Is this instruction a regular opcode?booleanisReturn()Is this instruction a return statement?booleanisSwitch()Is this instruction a switch?booleanisThrow()Is this instruction a throw statement?List<BytecodeLabel>jumps()Jump to a label.Stringview()Human-readable representation.voidwriteTo(org.objectweb.asm.MethodVisitor visitor, AsmLabels labels)Write instruction to the method visitor.
-
-
-
Method Detail
-
writeTo
void writeTo(org.objectweb.asm.MethodVisitor visitor, AsmLabels labels)Write instruction to the method visitor.- Parameters:
visitor- Method visitor.labels- Method labels.
-
directives
Iterable<org.xembly.Directive> directives(boolean counting)
Convert entry to directives.- Parameters:
counting- Do we need to add numbers to entry names?- Returns:
- Directives.
-
isLabel
boolean isLabel()
Is this instruction a label?- Returns:
- True if it is.
-
isSwitch
boolean isSwitch()
Is this instruction a switch?- Returns:
- True if it is.
-
isJump
boolean isJump()
Is this instruction a goto? Is it a goto or jsr?- Returns:
- True if it is.
-
isIf
boolean isIf()
Is this instruction a conditional branch?- Returns:
- True if it is.
-
isReturn
boolean isReturn()
Is this instruction a return statement?- Returns:
- True if it is.
-
isThrow
boolean isThrow()
Is this instruction a throw statement?- Returns:
- True if it is.
-
isOpcode
boolean isOpcode()
Is this instruction a regular opcode?- Returns:
- True if it is.
-
impact
int impact()
Impact of the instruction on the stack.- Returns:
- Stack impact.
-
jumps
List<BytecodeLabel> jumps()
Jump to a label. Where to jump.- Returns:
- Jumps.
-
view
String view()
Human-readable representation.- Returns:
- Text.
-
-