@Test void checkEntityLoaders() { final List<Binding<EntityLoader>> loadersBindings = injector.findBindingsByType(TypeLiteral.get(EntityLoader.class)); assertNotNull(loadersBindings); assertFalse(loadersBindings.isEmpty()); final List<EntityLoader> loaders = loadersBindings.stream().map(b -> injector.getInstance(b.getKey())).collect(toList()); assertFalse(loaders.isEmpty()); assertEquals(loadersBindings.size(), loaders.size()); final EntityLoaderRegistry registry = injector.getInstance(EntityLoaderRegistry.class); assertNotNull(registry); assertNotNull(registry.getEntityLoaders()); assertFalse(registry.getEntityLoaders().isEmpty()); assertTrue(registry.getEntityLoaders().containsAll(loaders.stream().filter(l -> !l.getClass().getSimpleName().contains("Test")).collect(Collectors.toList()))); registry.getEntityLoaders().forEach(l -> assertFalse(Modifier.isAbstract(l.getClass().getModifiers()))); }
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);  }