GuiceUtils { public static <T> ImmutableList<? extends T> loadInstances( Injector injector, Class<T> baseClass, String classNames) { return loadInstances(injector, baseClass, parseClassNames(classNames)); } private  GuiceUtils(); static ImmutableList<? extends T> loadInstances(
      Injector injector,
      Class<T> baseClass,
      String classNames); static ImmutableList<? extends T> loadInstances(
      Injector injector,
      Class<T> baseClass,
      Iterable<String> classNames); static ImmutableList<String> parseClassNames(String classNames); static ImmutableList<Class<? extends T>> loadClasses(
      Class<T> baseClass, String... classNames); static ImmutableList<Class<? extends T>> loadClasses(
      Class<T> baseClass,
      Iterable<String> classNames); static ImmutableList<? extends T> getInstances(
      Injector injector,
      Iterable<Class<? extends T>> classes);  }
@Test public void loadInstances() { Injector injector = Guice.createInjector(Stage.DEVELOPMENT, new Module() { @Override public void configure(Binder binder) { binder.bind(String.class).toInstance("Test"); } }); List<? extends String> instances = GuiceUtils.loadInstances(injector, String.class, "java.lang.String"); assertEquals(ImmutableList.of("Test"), instances); }