PsiClass () { LOG.assertTrue(getParent() instanceof PsiAnnotationParameterList && getParent().getParent() instanceof PsiAnnotation); PsiAnnotation annotation = (PsiAnnotation)getParent().getParent(); PsiJavaCodeReferenceElement nameRef = annotation.getNameReferenceElement(); if (nameRef == null) return null; PsiElement target = nameRef.resolve(); return target instanceof PsiClass ? (PsiClass)target : null; }