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, getServerConfigGroovyBindingsSpec add(Module module)
add in interface BindingsSpecmodule - module whose bindings should be addedGroovyBindingsSpec add(Class<? extends Module> moduleClass)
add in interface BindingsSpecmoduleClass - 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 BindingsSpecC - 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 BindingsSpecC - 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 BindingsSpecC - 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 BindingsSpecC - 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 BindingsSpecaction - the binder configurationGroovyBindingsSpec bind(Class<?> type)
bind in interface BindingsSpectype - the type to add a binding for<T> GroovyBindingsSpec bind(Class<T> publicType, Class<? extends T> implType)
bind in interface BindingsSpecT - 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 BindingsSpecT - 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 BindingsSpecT - the type of the bindinginstance - the instance to bind<T> GroovyBindingsSpec providerType(Class<T> publicType, Class<? extends Provider<? extends T>> providerType)
providerType in interface BindingsSpecT - 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 BindingsSpecT - The public type of the objectpublicType - the public type of the objectprovider - the provider for the object