Class Symbols.UnknownSymbol

java.lang.Object
org.sonar.java.model.Symbols.DefaultSymbol
org.sonar.java.model.Symbols.UnknownSymbol
All Implemented Interfaces:
Symbol
Direct Known Subclasses:
Symbols.RootPackageSymbol, Symbols.UnknownMethodSymbol, Symbols.UnkownTypeSymbol
Enclosing class:
Symbols

public static class Symbols.UnknownSymbol extends Symbols.DefaultSymbol
  • Constructor Details

    • UnknownSymbol

      public UnknownSymbol()
  • Method Details

    • isUnknown

      public boolean isUnknown()
    • name

      public String name()
      Description copied from interface: Symbol
      Name of this symbol.
      Returns:
      simple name of the symbol.
    • owner

      public Symbol owner()
      Description copied from interface: Symbol
      The owner of this symbol.
      Returns:
      the symbol that owns this symbol, null for package symbols, or unknown symbols
    • type

      public final Type type()
      Description copied from interface: Symbol
      Type of symbol.
      Returns:
      the type of this symbol.
    • enclosingClass

      public final Symbol.TypeSymbol enclosingClass()
      Description copied from interface: Symbol
      The closest enclosing class.
      Returns:
      null for package symbols, themselves for type symbol and enclosing class of methods or variables.
    • declaration

      public Tree declaration()
      Description copied from interface: Symbol
      Declaration node of this symbol. Currently, only works for declaration within the same file.
      Returns:
      the Tree of the declaration of this symbol. Null if declaration does not occur in the currently analyzed file.
    • usages

      public final List<IdentifierTree> usages()
      Description copied from interface: Symbol
      The identifier trees that reference this symbol.
      Returns:
      a list of IdentifierTree referencing this symbol. An empty list if this symbol is unused.