Class BytecodeLabel
java.lang.Object
org.eolang.jeo.representation.bytecode.BytecodeLabel
- All Implemented Interfaces:
BytecodeEntry
Mark label instruction.
- Since:
- 0.1
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.BytecodeLabel(byte[] uid) Constructor.BytecodeLabel(String label) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionIterable<org.xembly.Directive>directives(int index, Format format) 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?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?jumps()Jump to a label.uid()view()Human-readable representation.voidWrite instruction to the method visitor.
-
Constructor Details
-
BytecodeLabel
public BytecodeLabel()Constructor. -
BytecodeLabel
public BytecodeLabel(byte[] uid) Constructor.- Parameters:
uid- Identifier.
-
BytecodeLabel
Constructor.- Parameters:
label- Identifier.
-
-
Method Details
-
writeTo
Description copied from interface:BytecodeEntryWrite instruction to the method visitor.- Specified by:
writeToin interfaceBytecodeEntry- Parameters:
visitor- Method visitor.labels- Method labels.
-
directives
Description copied from interface:BytecodeEntryConvert entry to directives.- Specified by:
directivesin interfaceBytecodeEntry- Parameters:
index- Index of the entry in the method.format- Format of the directives.- Returns:
- Directives.
-
isLabel
public boolean isLabel()Description copied from interface:BytecodeEntryIs this instruction a label?- Specified by:
isLabelin interfaceBytecodeEntry- Returns:
- True if it is.
-
isSwitch
public boolean isSwitch()Description copied from interface:BytecodeEntryIs this instruction a switch?- Specified by:
isSwitchin interfaceBytecodeEntry- Returns:
- True if it is.
-
isJump
public boolean isJump()Description copied from interface:BytecodeEntryIs this instruction a goto? Is it a goto or jsr?- Specified by:
isJumpin interfaceBytecodeEntry- Returns:
- True if it is.
-
isIf
public boolean isIf()Description copied from interface:BytecodeEntryIs this instruction a conditional branch?- Specified by:
isIfin interfaceBytecodeEntry- Returns:
- True if it is.
-
isReturn
public boolean isReturn()Description copied from interface:BytecodeEntryIs this instruction a return statement?- Specified by:
isReturnin interfaceBytecodeEntry- Returns:
- True if it is.
-
isThrow
public boolean isThrow()Description copied from interface:BytecodeEntryIs this instruction a throw statement?- Specified by:
isThrowin interfaceBytecodeEntry- Returns:
- True if it is.
-
isOpcode
public boolean isOpcode()Description copied from interface:BytecodeEntryIs this instruction a regular opcode?- Specified by:
isOpcodein interfaceBytecodeEntry- Returns:
- True if it is.
-
impact
public int impact()Description copied from interface:BytecodeEntryImpact of the instruction on the stack.- Specified by:
impactin interfaceBytecodeEntry- Returns:
- Stack impact.
-
jumps
Description copied from interface:BytecodeEntryJump to a label. Where to jump.- Specified by:
jumpsin interfaceBytecodeEntry- Returns:
- Jumps.
-
view
Description copied from interface:BytecodeEntryHuman-readable representation.- Specified by:
viewin interfaceBytecodeEntry- Returns:
- Text.
-
uid
-