Package | Description |
---|---|
ratpack.groovy.guice |
Groovy specific extensions to the Guice support.
|
ratpack.guice |
Integration with Google Guice.
|
Modifier and Type | Interface and Description |
---|---|
interface |
GroovyBindingsSpec
Groovy specific extensions to
BindingsSpec . |
Modifier and Type | Method and Description |
---|---|
BindingsSpec |
BindingsSpec.add(Class<? extends Module> moduleClass) |
<C,T extends ConfigurableModule<C>> |
BindingsSpec.add(Class<T> moduleClass,
Action<? super C> configuration) |
BindingsSpec |
BindingsSpec.add(Module modules)
Adds the bindings from the given modules.
|
BindingsSpec |
BindingsSpec.bind(Class<?> type)
Add a binding for the given type.
|
<T> BindingsSpec |
BindingsSpec.bind(Class<T> publicType,
Class<? extends T> implType)
Add a binding for the given public type, to the given implementation type.
|
BindingsSpec |
BindingsSpec.binder(Action<? super Binder> action)
Adds bindings by directly configuring a
Binder . |
<T> BindingsSpec |
BindingsSpec.bindInstance(Class<? super T> publicType,
T instance)
Add a binding for the given public type, to the given implementing instance.
|
<T> BindingsSpec |
BindingsSpec.bindInstance(T instance)
Add a binding for the given object to its concrete type.
|
<T extends Module> |
BindingsSpec.config(Class<T> moduleClass,
Consumer<? super T> configurer)
Retrieves the module that has been added with the given type for configuration.
|
BindingsSpec |
BindingsSpec.init(Action<? super Injector> action)
Registers an action to operate on the injector when it has been finalized.
|
BindingsSpec |
BindingsSpec.init(Class<? extends Runnable> clazz)
Registers a runnable to instantiated via dependency injection when the injector is created from this module registry.
|
<T> BindingsSpec |
BindingsSpec.provider(Class<T> publicType,
Provider<? extends T> provider)
Add a binding for the given public type, to the given provider.
|
<T> BindingsSpec |
BindingsSpec.providerType(Class<T> publicType,
Class<? extends Provider<? extends T>> providerType)
Add a binding for the given public type, to the given provider type.
|
Modifier and Type | Method and Description |
---|---|
Guice.Builder |
Guice.Builder.bindings(Action<? super BindingsSpec> action) |
Handler |
GuiceBackedHandlerFactory.create(Action<? super BindingsSpec> modulesAction,
Function<? super Module,? extends Injector> moduleTransformer,
Function<? super Injector,? extends Handler> handler) |