ClassSymbolImpl extends SymbolImpl implements ClassSymbol { @Override public boolean isOrExtends(String fullyQualifiedClassName) { return allSuperClasses(false).stream().anyMatch(c -> c.fullyQualifiedName() != null && Objects.equals(fullyQualifiedClassName, c.fullyQualifiedName())); } 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 isOrExtends() { ClassSymbolImpl a = new ClassSymbolImpl("a", "mod1.a"); ClassSymbolImpl b = new ClassSymbolImpl("b", "mod2.b"); a.addSuperClass(b); assertThat(a.isOrExtends("a")).isFalse(); assertThat(a.isOrExtends("mod1.a")).isTrue(); assertThat(a.isOrExtends("mod2.b")).isTrue(); assertThat(a.isOrExtends("mod2.x")).isFalse(); assertThat(a.isOrExtends(a)).isTrue(); assertThat(a.isOrExtends(b)).isTrue(); assertThat(b.isOrExtends(a)).isFalse(); ClassSymbolImpl c = new ClassSymbolImpl("c", "mod2.c"); assertThat(a.isOrExtends(c)).isFalse(); assertThat(new ClassSymbolImpl("foo", "foo").isOrExtends(TypeShed.typeShedClass("object"))).isTrue(); assertThat(a.isOrExtends(TypeShed.typeShedClass("object"))).isTrue(); }