|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.guice.spi.BinderHolder
org.jboss.guice.spi.GuiceIntegration
public abstract class GuiceIntegration
Microcontainer + Guice integration.
Constructor Summary | |
---|---|
protected |
GuiceIntegration(Kernel kernel,
com.google.inject.Binder binder)
|
Method Summary | ||
---|---|---|
static void |
bindAll(com.google.inject.Binder binder,
Controller controller)
Binds all Microcontainer beans from the given factory by name. |
|
static void |
bindAll(com.google.inject.Binder binder,
Controller controller,
ControllerContextBindFilter filter)
Binds all Microcontainer beans from the given factory by name. |
|
protected static void |
bindContext(com.google.inject.Binder binder,
Controller controller,
ControllerContext context)
Bind controller context. |
|
static
|
fromMicrocontainer(Class<T> type)
Creates a provider which looks up objects from Microcontainer using the given type. |
|
static
|
fromMicrocontainer(Class<T> type,
Object name)
Creates a provider which looks up objects from Microcontainer using the given name. |
|
protected KernelController |
getController()
Get the kernel controller. |
Methods inherited from class org.jboss.guice.spi.BinderHolder |
---|
getBinder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected GuiceIntegration(Kernel kernel, com.google.inject.Binder binder)
Method Detail |
---|
protected KernelController getController()
public static <T> com.google.inject.Provider<T> fromMicrocontainer(Class<T> type, Object name)
Controller
. Example usage:
bind(DataSource.class).toProvider(fromMicrocontainer(DataSource.class, "dataSource"));
T
- the class typetype
- the class typename
- the bean name
public static <T> com.google.inject.Provider<T> fromMicrocontainer(Class<T> type)
Controller
. Example usage:
bind(DataSource.class).toProvider(fromMicrocontainer(DataSource.class));
T
- the class typetype
- the class type
public static void bindAll(com.google.inject.Binder binder, Controller controller)
@Named("foo")
.
binder
- the bindercontroller
- the controllerNamed
,
Names.named(String)
public static void bindAll(com.google.inject.Binder binder, Controller controller, ControllerContextBindFilter filter)
@Named("foo")
.
binder
- the bindercontroller
- the controllerfilter
- the filterNamed
,
Names.named(String)
protected static void bindContext(com.google.inject.Binder binder, Controller controller, ControllerContext context)
binder
- the bindercontroller
- the controllercontext
- the context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |