private static @Nullable PsiPackage getPackage(@NotNull PsiPackageStatement packageStatement) {
    PsiJavaCodeReferenceElement packageReference = packageStatement.getPackageReference();
    return ObjectUtils.tryCast(packageReference.resolve(), PsiPackage.class);
  }
private static @Nullable PsiPackage getPackage(@NotNull PsiPackageStatement packageStatement)