Package org.sonar.php.tree.symbols
Class SymbolTableImpl
- java.lang.Object
-
- org.sonar.php.tree.symbols.SymbolTableImpl
-
- All Implemented Interfaces:
SymbolTable
public class SymbolTableImpl extends Object implements SymbolTable
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<ClassSymbolData>classSymbolDatas()static SymbolTableImplcreate(CompilationUnitTree compilationUnit)static SymbolTableImplcreate(CompilationUnitTree compilationUnit, ProjectSymbolData projectSymbolData, PhpFile file)Collection<FunctionSymbolData>functionSymbolDatas()ScopegetScopeFor(Tree tree)Set<Scope>getScopes()SymbolgetSymbol(Tree tree)List<Symbol>getSymbols()Returns all symbols in scriptList<Symbol>getSymbols(String name)List<Symbol>getSymbols(Symbol.Kind kind)
-
-
-
Method Detail
-
create
public static SymbolTableImpl create(CompilationUnitTree compilationUnit)
-
create
public static SymbolTableImpl create(CompilationUnitTree compilationUnit, ProjectSymbolData projectSymbolData, @Nullable PhpFile file)
-
getScopes
public Set<Scope> getScopes()
- Specified by:
getScopesin interfaceSymbolTable
-
getScopeFor
@Nullable public Scope getScopeFor(Tree tree)
- Specified by:
getScopeForin interfaceSymbolTable
-
getSymbols
public List<Symbol> getSymbols(Symbol.Kind kind)
- Specified by:
getSymbolsin interfaceSymbolTable- Parameters:
kind- kind of symbols to look for- Returns:
- list of symbols with the given kind
-
getSymbols
public List<Symbol> getSymbols(String name)
- Parameters:
name- name of symbols to look for- Returns:
- list of symbols with the given name
-
getSymbol
@CheckForNull public Symbol getSymbol(Tree tree)
- Specified by:
getSymbolin interfaceSymbolTable
-
classSymbolDatas
public Collection<ClassSymbolData> classSymbolDatas()
-
functionSymbolDatas
public Collection<FunctionSymbolData> functionSymbolDatas()
-
-