public interface GroovyBindingsSpec extends BindingsSpec
BindingsSpec
.Modifier and Type | Method and Description |
---|---|
GroovyBindingsSpec |
add(Class<? extends Module> moduleClass)
Adds the bindings from the given module.
|
<C,T extends ConfigurableModule<C>> |
add(Class<T> moduleClass,
Action<? super C> configurer)
Adds the bindings from the given configurable module.
|
<C> GroovyBindingsSpec |
add(ConfigurableModule<C> module,
Action<? super C> configurer)
Adds the bindings from the given configurable module.
|
GroovyBindingsSpec |
add(Module module)
Adds the bindings from the given module.
|
<C,T extends ConfigurableModule<C>> |
addConfig(Class<T> moduleClass,
C config,
Action<? super C> configurer)
Adds the bindings from the given configurable module.
|
<C> GroovyBindingsSpec |
addConfig(ConfigurableModule<C> module,
C config,
Action<? super C> configurer)
Adds the bindings from the given configurable module.
|
GroovyBindingsSpec |
bind(Class<?> type)
Add a binding for the given type.
|
<T> GroovyBindingsSpec |
bind(Class<T> publicType,
Class<? extends T> implType)
Add a binding for the given public type, to the given implementation type.
|
GroovyBindingsSpec |
binder(Action<? super Binder> action)
Adds bindings by directly configuring a
Binder . |
<T> GroovyBindingsSpec |
bindInstance(Class<? super T> publicType,
T instance)
Add a binding for the given public type, to the given implementing instance.
|
<T> GroovyBindingsSpec |
bindInstance(T instance)
Add a binding for the given object to its concrete type.
|
<T> GroovyBindingsSpec |
provider(Class<T> publicType,
Provider<? extends T> provider)
Add a binding for the given public type, to the given provider.
|
<T> GroovyBindingsSpec |
providerType(Class<T> publicType,
Class<? extends Provider<? extends T>> providerType)
Add a binding for the given public type, to the given provider type.
|
addConfig, addConfig, getServerConfig, multiBind, multiBind, multiBinder, multiBinder, multiBindInstance, multiBindInstance, multiBindProvider, multiBindProviderType
GroovyBindingsSpec add(Module module)
add
in interface BindingsSpec
module
- module whose bindings should be addedGroovyBindingsSpec add(Class<? extends Module> moduleClass)
add
in interface BindingsSpec
moduleClass
- type of the module whose bindings should be added<C,T extends ConfigurableModule<C>> GroovyBindingsSpec add(Class<T> moduleClass, Action<? super C> configurer)
add
in interface BindingsSpec
C
- the type of the module's config objectT
- the type of the modulemoduleClass
- type of the module whose bindings should be addedconfigurer
- action to customize the module's config object<C> GroovyBindingsSpec add(ConfigurableModule<C> module, Action<? super C> configurer)
add
in interface BindingsSpec
C
- the type of the module's config objectmodule
- module whose bindings should be addedconfigurer
- action to customize the module's config object<C,T extends ConfigurableModule<C>> GroovyBindingsSpec addConfig(Class<T> moduleClass, C config, Action<? super C> configurer)
addConfig
in interface BindingsSpec
C
- the type of the module's config objectT
- the type of the modulemoduleClass
- type of the module whose bindings should be addedconfig
- config object for the moduleconfigurer
- action to customize the module's config object<C> GroovyBindingsSpec addConfig(ConfigurableModule<C> module, C config, Action<? super C> configurer)
addConfig
in interface BindingsSpec
C
- the type of the module's config objectmodule
- module whose bindings should be addedconfig
- config object for the moduleconfigurer
- action to customize the module's config objectGroovyBindingsSpec binder(Action<? super Binder> action)
Binder
.binder
in interface BindingsSpec
action
- the binder configurationGroovyBindingsSpec bind(Class<?> type)
bind
in interface BindingsSpec
type
- the type to add a binding for<T> GroovyBindingsSpec bind(Class<T> publicType, Class<? extends T> implType)
bind
in interface BindingsSpec
T
- the public type of the bindingpublicType
- the public type of the bindingimplType
- the class implementing the public type<T> GroovyBindingsSpec bindInstance(Class<? super T> publicType, T instance)
bindInstance
in interface BindingsSpec
T
- the public type of the bindingpublicType
- the public type of the bindinginstance
- the instance that implements the public type<T> GroovyBindingsSpec bindInstance(T instance)
bindInstance
in interface BindingsSpec
T
- the type of the bindinginstance
- the instance to bind<T> GroovyBindingsSpec providerType(Class<T> publicType, Class<? extends Provider<? extends T>> providerType)
providerType
in interface BindingsSpec
T
- The public type of the objectpublicType
- the public type of the objectproviderType
- the type of the provider for the object<T> GroovyBindingsSpec provider(Class<T> publicType, Provider<? extends T> provider)
provider
in interface BindingsSpec
T
- The public type of the objectpublicType
- the public type of the objectprovider
- the provider for the object