@Override
  public ProblemDescriptor @Nullable [] checkClass(@NotNull PsiClass aClass, @NotNull InspectionManager manager, boolean isOnTheFly) {
    if (!aClass.isAnnotationType()) {
      return null;
    }
    if (MetaAnnotationUtil.isMetaAnnotated(aClass, ourAnnotations)) {
      PsiAnnotation annotation = AnnotationUtil.findAnnotation(aClass, CommonClassNames.JAVA_LANG_ANNOTATION_RETENTION);
      if (annotation == null) {
        String runtimeRef = StringUtil.getQualifiedName("java.lang.annotation.RetentionPolicy", "RUNTIME");
        PsiAnnotation newAnnotation = JavaPsiFacade.getElementFactory(aClass.getProject())
          .createAnnotationFromText("@Retention(" + runtimeRef + ")", aClass);
        AddAnnotationPsiFix annotationPsiFix = new AddAnnotationPsiFix(CommonClassNames.JAVA_LANG_ANNOTATION_RETENTION,
                                                                       aClass,
                                                                       newAnnotation.getParameterList().getAttributes());
        ProblemDescriptor descriptor =
          manager.createProblemDescriptor(ObjectUtils.notNull(aClass.getNameIdentifier(), aClass),
                                          InspectionGadgetsBundle.message("inspection.meta.annotation.without.runtime.description",
                                                                          aClass.getName()),
                                          annotationPsiFix, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, isOnTheFly);
        return new ProblemDescriptor[]{descriptor};
      }
      else {
        PsiAnnotationMemberValue attributeValue = annotation.findDeclaredAttributeValue("value");
        if (attributeValue == null || !attributeValue.getText().contains("RUNTIME")) {
          ProblemDescriptor descriptor =
            manager.createProblemDescriptor(ObjectUtils.notNull(aClass.getNameIdentifier(), aClass),
                                            InspectionGadgetsBundle.message("inspection.meta.annotation.without.runtime.description",
                                                                            aClass.getName()),
                                            (LocalQuickFix)null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, isOnTheFly);
          return new ProblemDescriptor[]{descriptor};
        }
      }
    }
    return null;
  }
@Override
  public ProblemDescriptor @Nullable [] checkClass(@NotNull PsiClass aClass, @NotNull InspectionManager manager, boolean isOnTheFly)