Class LocalsSnapshot


  • public final class LocalsSnapshot
    extends Object
    An immutable slot-to-value view of a frame's locals, taken at one point in execution.
    • Constructor Detail

      • LocalsSnapshot

        public LocalsSnapshot​(ConcreteLocals locals)
        Copies every occupied slot into an unmodifiable map of value descriptions.
        Parameters:
        locals - the live local variable table
        Throws:
        IllegalArgumentException - if the table is null
    • Method Detail

      • get

        public ValueInfo get​(int slot)
        Parameters:
        slot - local variable slot index
        Returns:
        the value in a slot, or null if the slot was empty
      • size

        public int size()
        Returns:
        the number of occupied slots