@Test void shouldNotInstantiateForMissingDependencies() { GammaService gammaService = injector.createIfHasDependencies(GammaService.class); assertThat(gammaService, nullValue()); }
@Override public <T> T createIfHasDependencies(Class<T> clazz) { return resolve(REQUEST_SCOPED_IF_HAS_DEPENDENCIES, clazz); }
InjectorImpl implements Injector { @Override public <T> T createIfHasDependencies(Class<T> clazz) { return resolve(REQUEST_SCOPED_IF_HAS_DEPENDENCIES, clazz); } }
InjectorImpl implements Injector { @Override public <T> T createIfHasDependencies(Class<T> clazz) { return resolve(REQUEST_SCOPED_IF_HAS_DEPENDENCIES, clazz); } protected  InjectorImpl(InjectorConfig config); }
InjectorImpl implements Injector { @Override public <T> T createIfHasDependencies(Class<T> clazz) { return resolve(REQUEST_SCOPED_IF_HAS_DEPENDENCIES, clazz); } protected  InjectorImpl(InjectorConfig config); @Override void register(Class<? super T> clazz, T object); @Override void provide(Class<? extends Annotation> clazz, Object object); @Override T getSingleton(Class<T> clazz); @Override T newInstance(Class<T> clazz); @Override T getIfAvailable(Class<T> clazz); @Override T createIfHasDependencies(Class<T> clazz); @Override Collection<T> retrieveAllOfType(Class<T> clazz); @Override void registerProvider(Class<T> clazz, Provider<? extends T> provider); @Override void registerProvider(Class<T> clazz, Class<P> providerClass); InjectorConfig getConfig(); }
InjectorImpl implements Injector { @Override public <T> T createIfHasDependencies(Class<T> clazz) { return resolve(REQUEST_SCOPED_IF_HAS_DEPENDENCIES, clazz); } protected  InjectorImpl(InjectorConfig config); @Override void register(Class<? super T> clazz, T object); @Override void provide(Class<? extends Annotation> clazz, Object object); @Override T getSingleton(Class<T> clazz); @Override T newInstance(Class<T> clazz); @Override T getIfAvailable(Class<T> clazz); @Override T createIfHasDependencies(Class<T> clazz); @Override Collection<T> retrieveAllOfType(Class<T> clazz); @Override void registerProvider(Class<T> clazz, Provider<? extends T> provider); @Override void registerProvider(Class<T> clazz, Class<P> providerClass); InjectorConfig getConfig();  }