Interface ValueResolverContext

All Known Implementing Classes:
CompletionContext, VariableContext

public interface ValueResolverContext
Context used by the debugger to collect properties and methods of an object in a given stack frame.

Implementations of this interface are used in different scenarios:

  • CompletionContext for code completion, where both methods and properties are collected as completion items.
  • VariableContext for variable inspection, where properties are collected as debug variables and methods may be ignored.

The context provides access to the base object and the current stack frame, and allows adding methods or properties dynamically. It also allows the implementation to indicate whether to collect methods or properties via isCollectProperty() and isCollectMethod().

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMethod(Method method)
    Registers a method to the context (for completion or variable tracking).
    void
    addMethod(String method)
    Registers a method by name.
    void
    Registers a field as a property in the context.
    void
    addProperty(String property)
    Registers a property by name.
    Returns the base object being inspected.
    Returns the current stack frame for the debugger.
    boolean
    Returns true if the context is collecting methods.
    boolean
    Returns true if the context is collecting properties.
  • Method Details

    • getBase

      Object getBase()
      Returns the base object being inspected.
    • getStackFrame

      RemoteStackFrame getStackFrame()
      Returns the current stack frame for the debugger.
    • addMethod

      void addMethod(Method method)
      Registers a method to the context (for completion or variable tracking).
    • addProperty

      void addProperty(Field field)
      Registers a field as a property in the context.
    • addProperty

      void addProperty(String property)
      Registers a property by name.
    • addMethod

      void addMethod(String method)
      Registers a method by name.
    • isCollectProperty

      boolean isCollectProperty()
      Returns true if the context is collecting properties.
    • isCollectMethod

      boolean isCollectMethod()
      Returns true if the context is collecting methods.