boolean (PsiMember clazz, String annotName) { if (annotName == null) return false; final PsiModifierList list = clazz.getModifierList(); if (list == null) return false; for (PsiAnnotation annotation : list.getAnnotations()) { if (annotName.equals(annotation.getQualifiedName())) return true; } return false; }