Class DebugState.Builder

  • Enclosing class:
    DebugState

    public static class DebugState.Builder
    extends Object
    Mutable accumulator for the fields of a DebugState.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • currentMethod

        public DebugState.Builder currentMethod​(String method)
        Parameters:
        method - identifier of the executing method
        Returns:
        this builder
      • currentPC

        public DebugState.Builder currentPC​(int pc)
        Parameters:
        pc - bytecode offset of the next instruction
        Returns:
        this builder
      • currentLine

        public DebugState.Builder currentLine​(int line)
        Parameters:
        line - source line, or -1 when unknown
        Returns:
        this builder
      • callDepth

        public DebugState.Builder callDepth​(int depth)
        Parameters:
        depth - number of frames on the call stack
        Returns:
        this builder
      • instructionCount

        public DebugState.Builder instructionCount​(long count)
        Parameters:
        count - instructions executed so far
        Returns:
        this builder
      • hitBreakpoint

        public DebugState.Builder hitBreakpoint​(Breakpoint bp)
        Parameters:
        bp - breakpoint that stopped execution, or null if none did
        Returns:
        this builder
      • callStack

        public DebugState.Builder callStack​(List<StackFrameInfo> stack)
        Parameters:
        stack - frames from innermost outward; copied at build time, null means empty
        Returns:
        this builder
      • operandStack

        public DebugState.Builder operandStack​(StackSnapshot stack)
        Parameters:
        stack - operand stack snapshot of the current frame
        Returns:
        this builder
      • build

        public DebugState build()
        Returns:
        an immutable state snapshot, with the call stack defensively copied