boolean () { PsiElement resolved = resolve(); if (resolved instanceof PsiPackage) { return true; } else if (resolved instanceof PsiClass) { final String qualifiedReferenceName = getQualifiedReferenceName(); if (qualifiedReferenceName == null) return false; final String classFqn = ((PsiClass)resolved).getQualifiedName(); if (classFqn == null) return false; return qualifiedReferenceName.equals(classFqn); } else { return false; } }