PsiPackage (@NotNull PsiClass psiClass) { PsiDirectory directory = psiClass.getContainingFile().getContainingDirectory(); return directory == null ? null : JavaDirectoryService.getInstance().getPackage(directory); }