Class BytecodeTryCatchBlock
java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeTryCatchBlock
- All Implemented Interfaces:
BytecodeEntry
Bytecode try-catch block.
- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionBytecodeTryCatchBlock
(org.objectweb.asm.Label startlabel, org.objectweb.asm.Label endlabel, org.objectweb.asm.Label handlerlabel, String exception) Constructor. -
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.
-
Constructor Details
-
BytecodeTryCatchBlock
public BytecodeTryCatchBlock(org.objectweb.asm.Label startlabel, org.objectweb.asm.Label endlabel, org.objectweb.asm.Label handlerlabel, String exception) Constructor.- Parameters:
startlabel
- Start label.endlabel
- End label.handlerlabel
- Handler label.exception
- Exception type.
-
-
Method Details
-
writeTo
public void writeTo(org.objectweb.asm.MethodVisitor visitor) Description copied from interface:BytecodeEntry
Write instruction to the method visitor.- Specified by:
writeTo
in interfaceBytecodeEntry
- Parameters:
visitor
- Method visitor.
-
directives
- Specified by:
directives
in interfaceBytecodeEntry
-
isLabel
public boolean isLabel()Description copied from interface:BytecodeEntry
Is this instruction a label?- Specified by:
isLabel
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
isSwitch
public boolean isSwitch()Description copied from interface:BytecodeEntry
Is this instruction a switch?- Specified by:
isSwitch
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
isGoto
public boolean isGoto()Description copied from interface:BytecodeEntry
Is this instruction a goto?- Specified by:
isGoto
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
isIf
public boolean isIf()Description copied from interface:BytecodeEntry
Is this instruction a conditional branch?- Specified by:
isIf
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
isReturn
public boolean isReturn()Description copied from interface:BytecodeEntry
Is this instruction a return statement?- Specified by:
isReturn
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
isThrow
public boolean isThrow()Description copied from interface:BytecodeEntry
Is this instruction a throw statement?- Specified by:
isThrow
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
isOpcode
public boolean isOpcode()Description copied from interface:BytecodeEntry
Is this instruction a regular opcode?- Specified by:
isOpcode
in interfaceBytecodeEntry
- Returns:
- True if it is.
-
impact
public int impact()Description copied from interface:BytecodeEntry
Impact of the instruction on the stack.- Specified by:
impact
in interfaceBytecodeEntry
- Returns:
- Stack impact.
-
jumps
Description copied from interface:BytecodeEntry
Jump to a label. Where to jump.- Specified by:
jumps
in interfaceBytecodeEntry
- Returns:
- Jumps.
-