Interface BytecodeEntry
-
- All Known Implementing Classes:
BytecodeFrame
,BytecodeInstruction
,BytecodeLabel
,BytecodeLine
,BytecodeTryCatchBlock
public interface BytecodeEntry
Bytecode 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()
Convert entry to directives.int
impact()
Impact of the instruction on the stack.boolean
isIf()
Is this instruction a conditional branch?boolean
isJump()
Is this instruction a goto? Is it a goto or jsr?boolean
isLabel()
Is this instruction a label?boolean
isOpcode()
Is this instruction a regular opcode?boolean
isReturn()
Is this instruction a return statement?boolean
isSwitch()
Is this instruction a switch?boolean
isThrow()
Is this instruction a throw statement?List<BytecodeLabel>
jumps()
Jump to a label.String
view()
Human-readable representation.void
writeTo(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()
Convert entry to directives.- 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.
-
-