Package org.eclipse.sisu.space.asm
Class Label
- java.lang.Object
-
- org.eclipse.sisu.space.asm.Label
-
public class Label extends java.lang.ObjectA position in the bytecode of a method. Labels are used for jump, goto, and switch instructions, and for try catch blocks. A label designates the instruction that is just after. Note however that there can be other elements between a label and the instruction it designates (such as other labels, stack map frames, line numbers, etc.).- Author:
- Eric Bruneton
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.ObjectinfoA user managed state associated with this label.
-
Constructor Summary
Constructors Constructor Description Label()Constructs a new label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOffset()Returns the bytecode offset corresponding to this label.java.lang.StringtoString()Returns a string representation of this label.
-
-
-
Method Detail
-
getOffset
public int getOffset()
Returns the bytecode offset corresponding to this label. This offset is computed from the start of the method's bytecode. This method is intended forAttributesub classes, and is normally not needed by class generators or adapters.- Returns:
- the bytecode offset corresponding to this label.
- Throws:
java.lang.IllegalStateException- if this label is not resolved yet.
-
toString
public java.lang.String toString()
Returns a string representation of this label.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this label.
-
-