Class SimulatedStackframe<T>

    • Constructor Detail

      • SimulatedStackframe

        public SimulatedStackframe()
    • Method Detail

      • addValue

        public void addValue​(String id,
                             T value)
        Add a value to this stackframe
        Parameters:
        id - ID of the value
        value - The actual value
      • getValue

        public T getValue​(String id)
                   throws ValueNotInFrameException
        Retrieve a value from this stackframe. If the value is not part of this stackframe the parent stackframe is queried automatically
        Parameters:
        id - ID of the variable value to retrieve
        Returns:
        The value of the variable with id ID.
        Throws:
        ValueNotInFrameException - Is throw if this frame and all parent frames do not contain the id ID
      • copyFrame

        public SimulatedStackframe<T> copyFrame()
        Clone this stackframe
        Returns:
        A clone of the stackframe. The parent frames are copies as well
      • getContents

        public ArrayList<Map.Entry<String,​T>> getContents()
        Returns:
        All IDs and their value in the current frame. For debugging and error reporting cases
      • addVariables

        public void addVariables​(SimulatedStackframe<T> callResult)
        Add all variables and their values in the given frame to this frame
        Parameters:
        callResult - The frame whose contents will be copied into this frame