PsiMethod (PsiNameValuePair attribute) { PsiReference ref = attribute.getReference(); if (ref == null) return null; PsiElement target = ref.resolve(); if (PsiUtil.isAnnotationMethod(target)) { return (PsiAnnotationMethod)target; } return null; }