Class Scope

java.lang.Object
org.sonar.php.tree.symbols.Scope

public class Scope extends Object
  • Field Details

  • Constructor Details

    • Scope

      public Scope(Scope outer, Tree tree, boolean captureOuterScope)
    • Scope

      public Scope(CompilationUnitTree compilationUnitTree)
      Used for global scope
  • Method Details

    • tree

      public Tree tree()
    • outer

      public Scope outer()
    • getSymbols

      public List<Symbol> getSymbols(Symbol.Kind kind)
      Parameters:
      kind - of the symbols to look for
      Returns:
      the symbols corresponding to the given kind
    • isGlobal

      public boolean isGlobal()
    • addSymbol

      public void addSymbol(Symbol symbol)
    • getSymbol

      @Nullable public Symbol getSymbol(String name, Symbol.Kind... kinds)
      returns symbol available in this scope with satisfying name and kind. If no or more than one symbols meet conditions, then null is returned.
    • hasUnresolvedCompact

      public boolean hasUnresolvedCompact()