Package org.sonar.php.tree.symbols
Class Scope
- java.lang.Object
-
- org.sonar.php.tree.symbols.Scope
-
public class Scope extends Object
-
-
Constructor Summary
Constructors Constructor Description Scope(Scope outer, Tree tree, boolean captureOuterScope)
Scope(CompilationUnitTree compilationUnitTree)
Used for global scope
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSymbol(Symbol symbol)
Symbol
getSymbol(String name, Symbol.Kind... kinds)
returns symbol available in this scope with satisfying name and kind.List<Symbol>
getSymbols(Symbol.Kind kind)
boolean
hasUnresolvedCompact()
boolean
isGlobal()
Scope
outer()
Tree
tree()
-
-
-
Constructor Detail
-
Scope
public Scope(CompilationUnitTree compilationUnitTree)
Used for global scope
-
-
Method Detail
-
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()
-
-