Collection<PsiAnnotation> (PsiMember clazz, String annotName) { final ArrayList<PsiAnnotation> list = new ArrayList<>(); if (annotName == null) return list; final PsiModifierList mlist = clazz.getModifierList(); if (mlist == null) return list; for (PsiAnnotation annotation : mlist.getAnnotations()) { if (annotName.equals(annotation.getQualifiedName())) { list.add(annotation); } } return list; }