static public <T> ForwardingServiceLoader<T> loadWithSystemServiceLoader(Class<T> service) { return new ForwardingServiceLoader<>( ServiceLoader.load(service) ); }
/** * Resolves which standalone class to use. Either defined as a system * property or falling back to the default. * @return The resolved standalone class to use */ static public Class<? extends Standalone> resolveStandaloneClass() { return resolveStandaloneClass( System.getProperty(Standalone.KEY_NINJA_STANDALONE_CLASS), ForwardingServiceLoader.loadWithSystemServiceLoader(Standalone.class), Standalone.DEFAULT_STANDALONE_CLASS ); }
static public <T> ForwardingServiceLoader<T> loadWithSystemServiceLoader(Class<T> service, ClassLoader classLoader) { return new ForwardingServiceLoader<>( ServiceLoader.load(service, classLoader) ); }