boolean (PsiModifierList modifierList, String annotationName, String expectedParameterName) { final PsiAnnotation testAnnotation = modifierList.findAnnotation(annotationName); if (testAnnotation == null) { return false; } final PsiAnnotationParameterList parameterList = testAnnotation.getParameterList(); final PsiNameValuePair[] nameValuePairs = parameterList.getAttributes(); for (PsiNameValuePair nameValuePair : nameValuePairs) { @NonNls final String parameterName = nameValuePair.getName(); if (expectedParameterName.equals(parameterName)) { return true; } } return false; }