Class CodeContext.Offset

java.lang.Object
org.codehaus.janino.CodeContext.Offset
Direct Known Subclasses:
CodeContext.FourByteOffset, CodeContext.Inserter, CodeContext.LineNumberOffset
Enclosing class:
CodeContext

public class CodeContext.Offset extends Object
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 Details

  • 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.
    • 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

      public StackMap getStackMap()
    • setStackMap

      public void setStackMap(StackMap stackMap)
    • getCodeContext

      public final CodeContext getCodeContext()
      Returns:
      The CodeContext that this CodeContext.Offset belongs to
    • toString

      public String toString()
      Overrides:
      toString in class Object