Class SectionFrameGroup

java.lang.Object
io.quarkus.qute.debug.agent.frames.SectionFrameGroup

public class SectionFrameGroup extends Object
Represents a group of RemoteStackFrames belonging to a Qute section (e.g. #for, #if, #each).

Each group tracks frames created within a single section instance and manages their lifecycle during template rendering:

  • When the section ends — all frames are removed.
  • When a #for or #each loop advances to another iteration — the frames of the previous iteration are replaced.

  • Constructor Details

    • SectionFrameGroup

      public SectionFrameGroup(io.quarkus.qute.SectionHelper sectionHelper)
  • Method Details

    • getIndex

      public int getIndex()
      Returns the current iteration index (for #for/#each sections).
    • addFrame

      public void addFrame(RemoteStackFrame frame)
      Adds a frame to this section group.
    • detachFrames

      public void detachFrames(LinkedList<RemoteStackFrame> threadFrames)
      Removes all frames of this section from the given thread frame list.

      Used both when:

      • The section ends (e.g. #endfor, #endif).
      • A #for or #each section advances to another iteration.

    • detachFramesIfIndexChanged

      public void detachFramesIfIndexChanged(Object data, LinkedList<RemoteStackFrame> threadFrames)
      Checks if the current iteration index has changed, and detaches the frames from the given thread frame list if needed. This is used for loop sections (#for, #each) in Qute. When the loop advances to a new iteration, the frames associated with the previous iteration must be removed from the thread's active stack.
      Parameters:
      data - the loop iteration element (expected class: LoopSectionHelper$IterationElement)
      threadFrames - the list of frames in the RemoteThread