public final class InjectorBuilder
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
InjectorBuilder(DCModule parentModule,
com.google.inject.Injector injector) |
| Modifier and Type | Method and Description |
|---|---|
com.google.inject.Injector |
createInjector()
Creates an
Injector which in turn can be used to get instances of
various types. |
<E> E |
getInstance(java.lang.Class<E> type)
Gets an instance of a particular type
|
InjectorBuilder |
inherit(java.lang.Class<?> bindingClass) |
InjectorBuilder |
inherit(com.google.inject.Key<?> key) |
InjectorBuilder |
inherit(com.google.inject.TypeLiteral<?> typeLiteral) |
InjectorBuilder |
with(java.lang.Class<?> bindingClass,
java.lang.Object providerOrInstance) |
InjectorBuilder |
with(com.google.inject.TypeLiteral<?> bindingTypeLiteral,
java.lang.Object providerOrInstance) |
@Inject protected InjectorBuilder(DCModule parentModule, com.google.inject.Injector injector)
public InjectorBuilder with(java.lang.Class<?> bindingClass, java.lang.Object providerOrInstance)
public InjectorBuilder with(com.google.inject.TypeLiteral<?> bindingTypeLiteral, java.lang.Object providerOrInstance)
public InjectorBuilder inherit(java.lang.Class<?> bindingClass)
public InjectorBuilder inherit(com.google.inject.Key<?> key)
public InjectorBuilder inherit(com.google.inject.TypeLiteral<?> typeLiteral)
public <E> E getInstance(java.lang.Class<E> type)
E - type - public com.google.inject.Injector createInjector()
Injector which in turn can be used to get instances of
various types.
Note the the getInstance(Class) method is preferred, if only a
single injection is to be made.Copyright © 2015. All Rights Reserved.