Class PositionList

All Implemented Interfaces:
ToHuman

public final class PositionList extends FixedSizeList
List of source position entries. This class includes a utility method to extract an instance out of a DalvInsnList.
  • Field Details

  • Constructor Details

    • PositionList

      public PositionList(int size)
      Constructs an instance. All indices initially contain null.
      Parameters:
      size - >= 0; the size of the list
  • Method Details

    • make

      public static PositionList make(DalvInsnList insns, int howMuch)
      Extracts and returns the source position information out of an instruction list.
      Parameters:
      insns - non-null; instructions to convert
      howMuch - how much information should be included; one of the static constants defined by this class
      Returns:
      non-null; the positions list
    • get

      public PositionList.Entry get(int n)
      Gets the element at the given index. It is an error to call this with the index for an element which was never set; if you do that, this will throw NullPointerException.
      Parameters:
      n - >= 0, < size(); which index
      Returns:
      non-null; element at that index
    • set

      public void set(int n, PositionList.Entry entry)
      Sets the entry at the given index.
      Parameters:
      n - >= 0, < size(); which index
      entry - non-null; the entry to set at n