Package org.codehaus.janino
Class CodeContext.Offset
java.lang.Object
org.codehaus.janino.CodeContext.Offset
- Direct Known Subclasses:
CodeContext.BasicBlock
,CodeContext.FourByteOffset
,CodeContext.Inserter
,CodeContext.LineNumberOffset
- Enclosing class:
CodeContext
A class that represents an offset within a "Code" attribute.
The concept of an "offset" is that if one writes into the middle of a "Code" attribute, all offsets behind the insertion point are automatically shifted.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) CodeContext.Offset
Links to preceding and succeeding offsets.(package private) int
The offset in the code attribute that this object represents.(package private) CodeContext.Offset
Links to preceding and succeeding offsets.private StackMap
(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CodeContext
void
set()
Sets this "Offset" to the offset of the current inserter; inserts this "Offset" before the current inserter.void
Set this offset, and mark it as the the beginning of a "basic block".void
(package private) void
Merges the stack maps of the current inserter and THIS offset, and assigns the result to the current inserter and THIS offset.void
setStackMap
(StackMap stackMap) toString()
-
Field Details
-
offset
int offsetThe offset in the code attribute that this object represents. -
prev
-
next
-
UNSET
static final int UNSET- See Also:
-
stackMap
-
-
Constructor Details
-
Offset
public Offset()
-
-
Method Details
-
set
public void set()Sets this "Offset" to the offset of the current inserter; inserts this "Offset" before the current inserter. -
setBasicBlock
public void setBasicBlock()Set this offset, and mark it as the the beginning of a "basic block". -
setStackMap
void setStackMap()Merges the stack maps of the current inserter and THIS offset, and assigns the result to the current inserter and THIS offset. -
setOffset
public void setOffset() -
getStackMap
-
setStackMap
-
getCodeContext
- Returns:
- The
CodeContext
that thisCodeContext.Offset
belongs to
-
toString
-