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
Modifier and TypeMethodDescriptionIterable<org.xembly.Directive>
directives
(boolean counting) int
impact()
Impact of the instruction on the stack.boolean
isGoto()
Is this instruction a goto?boolean
isIf()
Is this instruction a conditional branch?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<org.objectweb.asm.Label>
jumps()
Jump to a label.void
writeTo
(org.objectweb.asm.MethodVisitor visitor) Write instruction to the method visitor.
-
Method Details
-
writeTo
void writeTo(org.objectweb.asm.MethodVisitor visitor) Write instruction to the method visitor.- Parameters:
visitor
- Method visitor.
-
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.
-
isGoto
boolean isGoto()Is this instruction a goto?- 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<org.objectweb.asm.Label> jumps()Jump to a label. Where to jump.- Returns:
- Jumps.
-