private void checkImplementedClass(PsiJavaCodeReferenceElement implementsElement,
                                       PsiJavaCodeReferenceElement extendsElement,
                                       PsiJavaCodeReferenceElement[] implementsElements) {
      final PsiElement target = implementsElement.resolve();
      if (!(target instanceof PsiClass implementedClass)) {
        return;
      }
      if (!implementedClass.isInterface()) {
        return;
      }
      final String qualifiedName = implementedClass.getQualifiedName();
      if (ignoreSerializable && CommonClassNames.JAVA_IO_SERIALIZABLE.equals(qualifiedName)) {
        return;
      }
      else if (ignoreCloneable && CommonClassNames.JAVA_LANG_CLONEABLE.equals(qualifiedName)) {
        return;
      }
      if (extendsElement != null) {
        final PsiElement extendsReferent = extendsElement.resolve();
        if (!(extendsReferent instanceof PsiClass extendedClass)) {
          return;
        }
        if (extendedClass.isInheritor(implementedClass, true)) {
          registerError(implementsElement);
          return;
        }
      }
      check(implementsElement, implementedClass, implementsElements);
    }
private void checkImplementedClass(PsiJavaCodeReferenceElement implementsElement,
                                       PsiJavaCodeReferenceElement extendsElement,
                                       PsiJavaCodeReferenceElement[] implementsElements)