Package play.inject.guice
Class GuiceApplicationBuilder
java.lang.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 -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new Play Application using this configured builder.static GuiceApplicationBuilderfromScalaBuilder(play.api.inject.guice.GuiceApplicationBuilder builder) load(com.google.inject.Module... modules) Override the module loader with the given Guice modules.load(play.api.inject.Binding<?>... bindings) Override the module loader with the given Play bindings.load(play.api.inject.guice.GuiceableModule... modules) Override the module loader with the given guiceable modules.load(play.api.inject.Module... modules) Override the module loader with the given Play modules.loadConfig(com.typesafe.config.Config conf) Set the initial configuration.protected GuiceApplicationBuildernewBuilder(play.api.inject.guice.GuiceApplicationBuilder builder) Implementation of Self creation for GuiceBuilder.withConfigLoader(Function<Environment, com.typesafe.config.Config> load) Set the initial configuration loader.withModuleLoader(BiFunction<Environment, com.typesafe.config.Config, List<play.api.inject.guice.GuiceableModule>> loader) Set the module loader.
-
Constructor Details
-
GuiceApplicationBuilder
public GuiceApplicationBuilder()
-
-
Method Details
-
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
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
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
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
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
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
Create a new Play Application using this configured builder.- Returns:
- the application
-
newBuilder
Implementation of Self creation for GuiceBuilder.- Specified by:
newBuilderin classGuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder> - Returns:
- the application builder
-