Determine ServiceLocator has no user defined services
问题 I'm trying to make a reusable component that creates a ServiceLocator from the services defined in the inhabitants file. I need to determine if the ServiceLocator has services apart from the built in ones. If it doesn't, maybe log some warning to the user. Something like ServiceLocator locator = ServiceLocatorUtilities.createAndPopulateServiceLocator(); List<?> services = locator.getAllServices(BuilderHelper.allFilter()); if (services.isEmpty()) { LOGGER.log(Level.WARNING, "No services. Make