code: public static boolean shouldBeExported(String packageName) {
          boolean service = packageName.endsWith(".service");
          service = service
                  || packageName.contains(".service.")
                  || packageName.endsWith(".services")
                  || packageName.contains(".services.");
  
          boolean api = packageName.endsWith(".api");
          api = api
                  || packageName.contains(".api.")
                  || packageName.endsWith(".apis")
                  || packageName.contains(".apis.");
  
          boolean model = packageName.endsWith(".model");
          model = model
                  || packageName.contains(".model.")
                  || packageName.endsWith(".models")
                  || packageName.contains(".models.");
  
          boolean entity = packageName.endsWith(".entity");
          entity = entity
                  || packageName.contains(".entity.")
                  || packageName.endsWith(".entities")
                  || packageName.contains(".entities.");
  
          return !packageName.isEmpty() && !packageName.equals(".") && (service || api || model || entity);
      }
docs: Checks whether the given package must be exported. The decision is made from heuristics.
  
  @param packageName the package name
  @return {@literal true} if the package has to be exported, {@literal false} otherwise.