Self
- the concrete type that is extending this classDelegate
- a scala GuiceBuilder type.public abstract class GuiceBuilder<Self,Delegate extends play.api.inject.guice.GuiceBuilder<Delegate>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
GuiceBuilder(Delegate delegate) |
Modifier and Type | Method and Description |
---|---|
com.google.inject.Module |
applicationModule()
Create a Guice module that can be used to inject an Application.
|
Self |
bindings(play.api.inject.Binding<?>... bindings)
Add Play bindings.
|
Self |
bindings(play.api.inject.guice.GuiceableModule... modules)
Add bindings from guiceable modules.
|
Self |
bindings(com.google.inject.Module... modules)
Add bindings from Guice modules.
|
Self |
bindings(play.api.inject.Module... modules)
Add bindings from Play modules.
|
Self |
configure(com.typesafe.config.Config conf)
Add additional configuration.
|
Self |
configure(Map<String,Object> conf)
Add additional configuration.
|
Self |
configure(String key,
Object value)
Add additional configuration.
|
Self |
disable(Class<?>... moduleClasses)
Disable modules by class.
|
Self |
in(ClassLoader classLoader)
Set the environment class loader.
|
Self |
in(Environment env)
Set the environment.
|
Self |
in(File path)
Set the environment path.
|
Self |
in(Mode mode)
Set the environment mode.
|
Injector |
injector()
Create a Play Injector backed by Guice using this configured builder.
|
protected abstract Self |
newBuilder(Delegate delegate) |
Self |
overrides(play.api.inject.Binding<?>... bindings)
Override bindings using Play bindings.
|
Self |
overrides(play.api.inject.guice.GuiceableModule... modules)
Override bindings using guiceable modules.
|
Self |
overrides(com.google.inject.Module... modules)
Override bindings using Guice modules.
|
Self |
overrides(play.api.inject.Module... modules)
Override bindings using Play modules.
|
protected GuiceBuilder(Delegate delegate)
public final Self in(Environment env)
env
- the environment to configure into this applicationpublic final Self in(File path)
path
- the path to configurepublic final Self in(Mode mode)
mode
- the mode to configurepublic final Self in(ClassLoader classLoader)
classLoader
- the class loader to usepublic final Self configure(com.typesafe.config.Config conf)
conf
- the configuration to addpublic final Self configure(Map<String,Object> conf)
conf
- the configuration to addpublic final Self configure(String key, Object value)
key
- a configuration key to setvalue
- the associated value for key
public final Self bindings(play.api.inject.guice.GuiceableModule... modules)
modules
- the set of modules to bindpublic final Self bindings(com.google.inject.Module... modules)
modules
- the set of Guice modules whose bindings to applypublic final Self bindings(play.api.inject.Module... modules)
modules
- the set of Guice modules whose bindings to applypublic final Self bindings(play.api.inject.Binding<?>... bindings)
bindings
- the set of play bindings to applypublic final Self overrides(play.api.inject.guice.GuiceableModule... modules)
modules
- the set of Guice modules whose bindings override some previously configured onespublic final Self overrides(com.google.inject.Module... modules)
modules
- the set of Guice modules whose bindings override some previously configured onespublic final Self overrides(play.api.inject.Module... modules)
modules
- the set of Play modules whose bindings override some previously configured onespublic final Self overrides(play.api.inject.Binding<?>... bindings)
bindings
- a set of Play bindings that override some previously configured onespublic final Self disable(Class<?>... moduleClasses)
moduleClasses
- the module classes whose bindings should be disabledpublic com.google.inject.Module applicationModule()
public Injector injector()