@Test public void test_class_symbol_with_interfaces() { SymbolTableImpl symbolTable = symbolTableFor("<?php namespace N { class B implements I1, I2 {} interface I1 {} } "); TypeSymbol classB = (TypeSymbol) symbolTable.getSymbol("n\\b"); Symbol iface1 = symbolTable.getSymbol("n\\i1"); Symbol iface2 = symbolTable.getSymbol("n\\i2"); assertThat(classB.interfaces()).containsExactly(iface1, iface2); assertThat(iface1).isInstanceOf(TypeSymbol.class); assertThat(iface2).isInstanceOf(UndeclaredSymbol.class); }
Symbol getSymbol(QualifiedName qualifiedName) { return symbolByQualifiedName.get(qualifiedName); }
SymbolTableImpl implements SymbolTable { Symbol getSymbol(QualifiedName qualifiedName) { return symbolByQualifiedName.get(qualifiedName); } }
SymbolTableImpl implements SymbolTable { Symbol getSymbol(QualifiedName qualifiedName) { return symbolByQualifiedName.get(qualifiedName); } private  SymbolTableImpl(); }
SymbolTableImpl implements SymbolTable { Symbol getSymbol(QualifiedName qualifiedName) { return symbolByQualifiedName.get(qualifiedName); } private  SymbolTableImpl(); static SymbolTableImpl create(CompilationUnitTree compilationUnit); static SymbolTableImpl create(CompilationUnitTree compilationUnit, ProjectSymbolData projectSymbolData, @Nullable PhpFile file); @Override ImmutableSet<Scope> getScopes(); @Nullable @Override Scope getScopeFor(Tree tree); ImmutableList<Symbol> getSymbols(); @Override List<Symbol> getSymbols(Symbol.Kind kind); List<Symbol> getSymbols(String name); @Override @CheckForNull Symbol getSymbol(Tree tree); Collection<ClassSymbolData> classSymbolDatas(); Collection<FunctionSymbolData> functionSymbolDatas(); }
SymbolTableImpl implements SymbolTable { Symbol getSymbol(QualifiedName qualifiedName) { return symbolByQualifiedName.get(qualifiedName); } private  SymbolTableImpl(); static SymbolTableImpl create(CompilationUnitTree compilationUnit); static SymbolTableImpl create(CompilationUnitTree compilationUnit, ProjectSymbolData projectSymbolData, @Nullable PhpFile file); @Override ImmutableSet<Scope> getScopes(); @Nullable @Override Scope getScopeFor(Tree tree); ImmutableList<Symbol> getSymbols(); @Override List<Symbol> getSymbols(Symbol.Kind kind); List<Symbol> getSymbols(String name); @Override @CheckForNull Symbol getSymbol(Tree tree); Collection<ClassSymbolData> classSymbolDatas(); Collection<FunctionSymbolData> functionSymbolDatas();  }