public static @Nullable @PropertyKey(resourceBundle = JavaBundle.BUNDLE) String checkInheritor(
    @NotNull PsiJavaFile parentFile, @Nullable PsiJavaModule module, @NotNull PsiClass inheritor) {
    @PropertyKey(resourceBundle = JavaBundle.BUNDLE)
    String result = null;
    if (PsiUtil.isLocalOrAnonymousClass(inheritor)) {
      result = "intention.error.make.sealed.class.has.anonymous.or.local.inheritors";
    }
    else if (module == null) {
      PsiJavaFile file = tryCast(inheritor.getContainingFile(), PsiJavaFile.class);
      if (file == null || file.getOriginalFile() instanceof PsiCompiledElement) {
        result = "intention.error.make.sealed.class.inheritors.not.in.java.file";
      }
      else if (!parentFile.getPackageName().equals(file.getPackageName())) {
        result = "intention.error.make.sealed.class.different.packages";
      }
    }
    else if (JavaModuleGraphUtil.findDescriptorByElement(inheritor) != module) {
      result = "intention.error.make.sealed.class.different.modules";
    }
    return result;
  }
public static @Nullable @PropertyKey(resourceBundle = JavaBundle.BUNDLE) String checkInheritor(
    @NotNull PsiJavaFile parentFile, @Nullable PsiJavaModule module, @NotNull PsiClass inheritor)