ClassSymbolImpl extends SymbolImpl implements ClassSymbol { @Override public Optional<Symbol> resolveMember(String memberName) { for (Symbol symbol : allSuperClasses(false)) { if (symbol.kind() == Kind.CLASS) { ClassSymbolImpl classSymbol = (ClassSymbolImpl) symbol; Symbol matchingMember = classSymbol.membersByName().get(memberName); if (matchingMember != null) { return Optional.of(matchingMember); } } } return Optional.empty(); } ClassSymbolImpl(ClassDef classDef, @Nullable String fullyQualifiedName, PythonFile pythonFile);  ClassSymbolImpl(String name, @Nullable String fullyQualifiedName);  ClassSymbolImpl(String name, @Nullable String fullyQualifiedName, @Nullable LocationInFile definitionLocation,
                         boolean hasDecorators, boolean hasMetaClass, @Nullable String metaclassFQN); @Override List<Symbol> superClasses(); void addSuperClass(Symbol symbol); @Override boolean hasUnresolvedTypeHierarchy(); boolean hasUnresolvedTypeHierarchy(boolean includeAmbiguousSymbols); @Override Set<Symbol> declaredMembers(); @Override Optional<Symbol> resolveMember(String memberName); boolean hasMetaClass(); @Override boolean canHaveMember(String memberName); boolean hasSuperClassWithUnknownMetaClass(); @Override LocationInFile definitionLocation(); @Override boolean isOrExtends(String fullyQualifiedClassName); @Override boolean isOrExtends(ClassSymbol other); @Override boolean canBeOrExtend(String fullyQualifiedClassName); @Override boolean hasDecorators(); void addMembers(Collection<Symbol> members); void setHasSuperClassWithoutSymbol(); void setHasMetaClass(); void setMetaclassFQN(String metaclassFQN); @CheckForNull String metaclassFQN(); @Override void removeUsages();  }
@Test public void resolveMember() { assertThat(new ClassSymbolImpl("a", null).resolveMember("foo")).isEmpty(); ClassSymbolImpl a = new ClassSymbolImpl("a", null); Symbol fooA = new SymbolImpl("foo", "a.foo"); a.addMembers(Collections.singleton(fooA)); assertThat(a.resolveMember("foo")).contains(fooA); ClassSymbolImpl b = new ClassSymbolImpl("b", null); Symbol c = new SymbolImpl("c", null); b.addSuperClass(c); assertThat(b.resolveMember("foo")).isEmpty(); }