Class JLabelSymbol

All Implemented Interfaces:
Symbol, Symbol.LabelSymbol

public class JLabelSymbol extends Symbols.DefaultSymbol implements Symbol.LabelSymbol
  • Method Details

    • name

      public String name()
      Description copied from interface: Symbol.LabelSymbol
      Name of that label.
      Specified by:
      name in interface Symbol
      Specified by:
      name in interface Symbol.LabelSymbol
      Returns:
      simple name of the symbol.
    • declaration

      public LabeledStatementTree declaration()
      Description copied from interface: Symbol.LabelSymbol
      Declaration tree of this label.
      Specified by:
      declaration in interface Symbol
      Specified by:
      declaration in interface Symbol.LabelSymbol
      Returns:
      the Tree of the declaration of this symbol. Null if declaration does not occur in the currently analyzed file.
    • usages

      public List<IdentifierTree> usages()
      Description copied from interface: Symbol.LabelSymbol
      Usages tree of this label.
      Specified by:
      usages in interface Symbol
      Specified by:
      usages in interface Symbol.LabelSymbol
      Returns:
      a list of IdentifierTree referencing this symbol. An empty list if this symbol is unused.
    • owner

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

      public Type type()
      Description copied from interface: Symbol
      Type of symbol.
      Specified by:
      type in interface Symbol
      Returns:
      the type of this symbol.
    • isUnknown

      public boolean isUnknown()
      Specified by:
      isUnknown in interface Symbol
    • enclosingClass

      @Nullable public Symbol.TypeSymbol enclosingClass()
      Description copied from interface: Symbol
      The closest enclosing class.
      Specified by:
      enclosingClass in interface Symbol
      Returns:
      null for package symbols, themselves for type symbol and enclosing class of methods or variables.