Class SymbolInformation

java.lang.Object
org.graalvm.tools.lsp.server.types.JSONBase
org.graalvm.tools.lsp.server.types.SymbolInformation

public class SymbolInformation extends JSONBase
Represents information about programming constructs like variables, classes, interfaces etc.
  • Method Details

    • getName

      public String getName()
      The name of this symbol.
    • setName

      public SymbolInformation setName(String name)
    • getKind

      public SymbolKind getKind()
      The kind of this symbol.
    • setKind

      public SymbolInformation setKind(SymbolKind kind)
    • getDeprecated

      public Boolean getDeprecated()
      Indicates if this symbol is deprecated.
    • setDeprecated

      public SymbolInformation setDeprecated(Boolean deprecated)
    • getLocation

      public Location getLocation()
      The location of this symbol. The location's range is used by a tool to reveal the location in the editor. If the symbol is selected in the tool the range's start information is used to position the cursor. So the range usually spans more than the actual symbol's name and does normally include thinks like visibility modifiers. The range doesn't have to denote a node range in the sense of a abstract syntax tree. It can therefore not be used to re-construct a hierarchy of the symbols.
    • setLocation

      public SymbolInformation setLocation(Location location)
    • getContainerName

      public String getContainerName()
      The name of the symbol containing this symbol. This information is for user interface purposes (e.g. to render a qualifier in the user interface if necessary). It can't be used to re-infer a hierarchy for the document symbols.
    • setContainerName

      public SymbolInformation setContainerName(String containerName)
    • equals

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

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

      public static SymbolInformation create(String name, SymbolKind kind, Range range, String uri, String containerName)
      Creates a new symbol information literal.
      Parameters:
      name - The name of the symbol.
      kind - The kind of the symbol.
      range - The range of the location of the symbol.
      uri - The resource of the location of symbol, defaults to the current document.
      containerName - The name of the symbol containing the symbol.