docs: public boolean isSpecOrThirdPartyOrBootDelegationPackage(String packageName) {
  
          SharedPackageInspector inspector = st.getService();
          if (inspector != null) {
              PackageType type = inspector.getExportedPackageType(packageName);
              if (type != null && type.isSpecApi()) {
                  return true;
              }
          }
  
          boolean isBundlePackage = false;
          // Check the boot delegation packages second, since they're patterns, and slower
          for (Pattern pattern : bootDelegationPackages) {
              isBundlePackage = pattern.matcher(packageName).matches();
              if (isBundlePackage) {
                  return isBundlePackage;
              }
          }
  
          // If we can't work it out, assume things aren't spec packages
          return false;
  
      }