Class CodeContext.Offset

  • Direct Known Subclasses:
    CodeContext.Inserter, CodeContext.LineNumberOffset
    Enclosing class:
    CodeContext

    public class CodeContext.Offset
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      (package private) CodeContext.Offset next
      Links to preceding and succeding offsets.
      (package private) int offset
      The offset in the code attribute that this object represents.
      (package private) CodeContext.Offset prev
      Links to preceding and succeding offsets.
      (package private) static int UNSET
      Special value for offset which indicates that this CodeContext.Offset has not yet been set()
    • Constructor Summary

      Constructors 
      Constructor Description
      Offset()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CodeContext getCodeContext()  
      void set()
      Sets this "Offset" to the offset of the current inserter; inserts this "Offset" before the current inserter.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Offset

        public Offset()
    • Method Detail

      • set

        public void set()
        Sets this "Offset" to the offset of the current inserter; inserts this "Offset" before the current inserter.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object