LocalQuickFix (@NotNull PsiClass psiClass, @NotNull String annotationFQN, @Nullable String annotationParam) { PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(psiClass.getProject()); PsiAnnotation newAnnotation = elementFactory.createAnnotationFromText("@" + annotationFQN + "(" + StringUtil.notNullize(annotationParam) + ")", psiClass); final PsiNameValuePair[] attributes = newAnnotation.getParameterList().getAttributes(); return new AddAnnotationFix(annotationFQN, psiClass, attributes); }