Package play.inject.guice
Class GuiceApplicationBuilder
- Object
-
- play.inject.guice.GuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder>
-
- play.inject.guice.GuiceApplicationBuilder
-
public final class GuiceApplicationBuilder extends GuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder>
-
-
Field Summary
-
Fields inherited from class play.inject.guice.GuiceBuilder
delegate
-
-
Constructor Summary
Constructors Constructor Description GuiceApplicationBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Applicationbuild()Create a new Play Application using this configured builder.static GuiceApplicationBuilderfromScalaBuilder(play.api.inject.guice.GuiceApplicationBuilder builder)GuiceApplicationBuilderload(com.google.inject.Module... modules)Override the module loader with the given Guice modules.GuiceApplicationBuilderload(play.api.inject.Binding<?>... bindings)Override the module loader with the given Play bindings.GuiceApplicationBuilderload(play.api.inject.guice.GuiceableModule... modules)Override the module loader with the given guiceable modules.GuiceApplicationBuilderload(play.api.inject.Module... modules)Override the module loader with the given Play modules.GuiceApplicationBuilderloadConfig(com.typesafe.config.Config conf)Set the initial configuration.protected GuiceApplicationBuildernewBuilder(play.api.inject.guice.GuiceApplicationBuilder builder)Implementation of Self creation for GuiceBuilder.GuiceApplicationBuilderwithConfigLoader(Function<Environment,com.typesafe.config.Config> load)Set the initial configuration loader.GuiceApplicationBuilderwithModuleLoader(BiFunction<Environment,com.typesafe.config.Config,List<play.api.inject.guice.GuiceableModule>> loader)Set the module loader.
-
-
-
Method Detail
-
fromScalaBuilder
public static GuiceApplicationBuilder fromScalaBuilder(play.api.inject.guice.GuiceApplicationBuilder builder)
-
withConfigLoader
public GuiceApplicationBuilder withConfigLoader(Function<Environment,com.typesafe.config.Config> load)
Set the initial configuration loader. Overrides the default or any previously configured values.- Parameters:
load- the configuration loader- Returns:
- the configured application builder
-
loadConfig
public GuiceApplicationBuilder loadConfig(com.typesafe.config.Config conf)
Set the initial configuration. Overrides the default or any previously configured values.- Parameters:
conf- the configuration- Returns:
- the configured application builder
-
withModuleLoader
public GuiceApplicationBuilder withModuleLoader(BiFunction<Environment,com.typesafe.config.Config,List<play.api.inject.guice.GuiceableModule>> loader)
Set the module loader. Overrides the default or any previously configured values.- Parameters:
loader- the configuration- Returns:
- the configured application builder
-
load
public GuiceApplicationBuilder load(play.api.inject.guice.GuiceableModule... modules)
Override the module loader with the given guiceable modules.- Parameters:
modules- the set of overriding modules- Returns:
- an application builder that incorporates the overrides
-
load
public GuiceApplicationBuilder load(com.google.inject.Module... modules)
Override the module loader with the given Guice modules.- Parameters:
modules- the set of overriding modules- Returns:
- an application builder that incorporates the overrides
-
load
public GuiceApplicationBuilder load(play.api.inject.Module... modules)
Override the module loader with the given Play modules.- Parameters:
modules- the set of overriding modules- Returns:
- an application builder that incorporates the overrides
-
load
public GuiceApplicationBuilder load(play.api.inject.Binding<?>... bindings)
Override the module loader with the given Play bindings.- Parameters:
bindings- the set of binding override- Returns:
- an application builder that incorporates the overrides
-
build
public Application build()
Create a new Play Application using this configured builder.- Returns:
- the application
-
newBuilder
protected GuiceApplicationBuilder newBuilder(play.api.inject.guice.GuiceApplicationBuilder builder)
Implementation of Self creation for GuiceBuilder.- Specified by:
newBuilderin classGuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder>- Returns:
- the application builder
-
-