public static boolean isAccessibleType(@NotNull PsiType type) {
    if (type instanceof PsiArrayType) {
      return isAccessibleType(type.getDeepComponentType());
    }

    if (TypeConversionUtil.isPrimitiveAndNotNull(type)) return true;

    PsiClass psiClass = PsiTypesUtil.getPsiClass(type);
    return isAccessible(psiClass) && !hasInaccessibleGenerics(type);
  }
public static boolean isAccessibleType(@NotNull PsiType type)