Class Scope

java.lang.Object
com.oracle.truffle.tools.dap.types.JSONBase
com.oracle.truffle.tools.dap.types.Scope

public class Scope extends JSONBase
A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.
  • Method Details

    • getName

      public String getName()
      Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated.
    • setName

      public Scope setName(String name)
    • getPresentationHint

      public String getPresentationHint()
      An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI. Values: 'arguments': Scope contains method arguments. 'locals': Scope contains local variables. 'registers': Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request. etc.
    • setPresentationHint

      public Scope setPresentationHint(String presentationHint)
    • getVariablesReference

      public int getVariablesReference()
      The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest.
    • setVariablesReference

      public Scope setVariablesReference(int variablesReference)
    • getNamedVariables

      public Integer getNamedVariables()
      The number of named variables in this scope. The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
    • setNamedVariables

      public Scope setNamedVariables(Integer namedVariables)
    • getIndexedVariables

      public Integer getIndexedVariables()
      The number of indexed variables in this scope. The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
    • setIndexedVariables

      public Scope setIndexedVariables(Integer indexedVariables)
    • isExpensive

      public boolean isExpensive()
      If true, the number of variables in this scope is large or expensive to retrieve.
    • setExpensive

      public Scope setExpensive(boolean expensive)
    • getSource

      public Source getSource()
      Optional source for this scope.
    • setSource

      public Scope setSource(Source source)
    • getLine

      public Integer getLine()
      Optional start line of the range covered by this scope.
    • setLine

      public Scope setLine(Integer line)
    • getColumn

      public Integer getColumn()
      Optional start column of the range covered by this scope.
    • setColumn

      public Scope setColumn(Integer column)
    • getEndLine

      public Integer getEndLine()
      Optional end line of the range covered by this scope.
    • setEndLine

      public Scope setEndLine(Integer endLine)
    • getEndColumn

      public Integer getEndColumn()
      Optional end column of the range covered by this scope.
    • setEndColumn

      public Scope setEndColumn(Integer endColumn)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static Scope create(String name, Integer variablesReference, Boolean expensive)