@Test void checkDependencyLoaders() { final List<Binding<BundleEntityLoader>> loadersBindings = injector.findBindingsByType(TypeLiteral.get(BundleEntityLoader.class)); assertNotNull(loadersBindings); assertFalse(loadersBindings.isEmpty()); final List<BundleEntityLoader> loaders = loadersBindings.stream().map(b -> injector.getInstance(b.getKey())).collect(toList()); assertFalse(loaders.isEmpty()); assertEquals(loadersBindings.size(), loaders.size()); final BundleEntityLoaderRegistry registry = injector.getInstance(BundleEntityLoaderRegistry.class); assertNotNull(registry); assertNotNull(registry.getEntityLoaders()); assertFalse(registry.getEntityLoaders().isEmpty()); assertEquals(registry.getEntityLoaders().size(), loaders.size()); assertTrue(registry.getEntityLoaders().values().containsAll(loaders)); }
public static <T> T getInstance(Class<T> serviceClass) { return getInjector().getInstance(serviceClass); }
InjectionRegistry extends AbstractModule { public static <T> T getInstance(Class<T> serviceClass) { return getInjector().getInstance(serviceClass); } }
InjectionRegistry extends AbstractModule { public static <T> T getInstance(Class<T> serviceClass) { return getInjector().getInstance(serviceClass); } private  InjectionRegistry(); }
InjectionRegistry extends AbstractModule { public static <T> T getInstance(Class<T> serviceClass) { return getInjector().getInstance(serviceClass); } private  InjectionRegistry(); static Injector getInjector(); static T getInstance(Class<T> serviceClass); }
InjectionRegistry extends AbstractModule { public static <T> T getInstance(Class<T> serviceClass) { return getInjector().getInstance(serviceClass); } private  InjectionRegistry(); static Injector getInjector(); static T getInstance(Class<T> serviceClass);  }