@Test public void noRegisteredServices() throws Exception { FileSystem.deleteServiceFile(List.class); ServiceLoader<?> loader = new ServiceLoader<>(List.class); assertThat(loader.createAll()).isEmpty(); }
public Collection<T> createAll(final Object... arguments) { Collection<T> instances = new ArrayList<T>(classes.size()); for (String className : classes) { T instance = createInstance(className, arguments); if (instance != null) { instances.add(instance); } } return instances; }
ServiceLoader { public Collection<T> createAll(final Object... arguments) { Collection<T> instances = new ArrayList<T>(classes.size()); for (String className : classes) { T instance = createInstance(className, arguments); if (instance != null) { instances.add(instance); } } return instances; } }
ServiceLoader { public Collection<T> createAll(final Object... arguments) { Collection<T> instances = new ArrayList<T>(classes.size()); for (String className : classes) { T instance = createInstance(className, arguments); if (instance != null) { instances.add(instance); } } return instances; } ServiceLoader(final Class<? extends T> service, final Class<?>... argumentTypes); }
ServiceLoader { public Collection<T> createAll(final Object... arguments) { Collection<T> instances = new ArrayList<T>(classes.size()); for (String className : classes) { T instance = createInstance(className, arguments); if (instance != null) { instances.add(instance); } } return instances; } ServiceLoader(final Class<? extends T> service, final Class<?>... argumentTypes); T create(final String name, final Object... arguments); List<T> createList(final String list); Collection<T> createAll(final Object... arguments); String toSimpleClassName(final String name); }
ServiceLoader { public Collection<T> createAll(final Object... arguments) { Collection<T> instances = new ArrayList<T>(classes.size()); for (String className : classes) { T instance = createInstance(className, arguments); if (instance != null) { instances.add(instance); } } return instances; } ServiceLoader(final Class<? extends T> service, final Class<?>... argumentTypes); T create(final String name, final Object... arguments); List<T> createList(final String list); Collection<T> createAll(final Object... arguments); String toSimpleClassName(final String name);  }