final case class GuiceApplicationBuilder(environment: Environment = Environment.simple(), configuration: Configuration = Configuration.empty, modules: Seq[GuiceableModule] = Seq.empty, overrides: Seq[GuiceableModule] = Seq.empty, disabled: Seq[Class[_]] = Seq.empty, binderOptions: Set[BinderOption] = BinderOption.defaults, eagerly: Boolean = false, loadConfiguration: (Environment) => Configuration = Configuration.load, loadModules: (Environment, Configuration) => Seq[GuiceableModule] = GuiceableModule.loadModules) extends GuiceBuilder[GuiceApplicationBuilder] with Product with Serializable
A builder for creating Applications using Guice.
- Alphabetic
- By Inheritance
- GuiceApplicationBuilder
- Serializable
- Product
- Equals
- GuiceBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new GuiceApplicationBuilder()
- new GuiceApplicationBuilder(environment: Environment = Environment.simple(), configuration: Configuration = Configuration.empty, modules: Seq[GuiceableModule] = Seq.empty, overrides: Seq[GuiceableModule] = Seq.empty, disabled: Seq[Class[_]] = Seq.empty, binderOptions: Set[BinderOption] = BinderOption.defaults, eagerly: Boolean = false, loadConfiguration: (Environment) => Configuration = Configuration.load, loadModules: (Environment, Configuration) => Seq[GuiceableModule] = GuiceableModule.loadModules)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def additionalRouter(router: Router): GuiceApplicationBuilder
Override the router with a router that first tries to route to the passed in additional router, before falling back to the default router.
- def appRoutes(routes: (Application) => PartialFunction[(String, String), Handler]): GuiceApplicationBuilder
Override the router with a fake router having the given routes, before falling back to the default router
- def applicationModule(): com.google.inject.Module
Create a new Play application Module for an Application using this configured builder.
Create a new Play application Module for an Application using this configured builder.
- Definition Classes
- GuiceApplicationBuilder → GuiceBuilder
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val binderOptions: Set[BinderOption]
- final def bindings(bindModules: GuiceableModule*): GuiceApplicationBuilder
Add Guice modules, Play modules, or Play bindings.
Add Guice modules, Play modules, or Play bindings.
- Definition Classes
- GuiceBuilder
- See also
GuiceableModuleConversions for the automatically available implicit conversions to GuiceableModule from modules and bindings.
- def build(): Application
Create a new Play Application using this configured builder.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val configuration: Configuration
- final def configure(conf: (String, Any)*): GuiceApplicationBuilder
Add additional configuration.
Add additional configuration.
- Definition Classes
- GuiceBuilder
- final def configure(conf: Map[String, Any]): GuiceApplicationBuilder
Add additional configuration.
Add additional configuration.
- Definition Classes
- GuiceBuilder
- final def configure(conf: Configuration): GuiceApplicationBuilder
Add additional configuration.
Add additional configuration.
- Definition Classes
- GuiceBuilder
- def configureLoggerFactory(configuration: Configuration): ILoggerFactory
Configures the SLF4J logger factory.
Configures the SLF4J logger factory. This is where LoggerConfigurator is called from.
- configuration
play.api.Configuration
- returns
the app wide ILoggerFactory. Useful for testing and DI.
- def createModule(): com.google.inject.Module
Creation of the Guice Module used by the injector.
Creation of the Guice Module used by the injector. Libraries like Guiceberry and Jukito that want to handle injector creation may find this helpful.
- Definition Classes
- GuiceBuilder
- final def disable[T](implicit tag: ClassTag[T]): GuiceApplicationBuilder
Disable module by class.
Disable module by class.
- Definition Classes
- GuiceBuilder
- final def disable(moduleClasses: Class[_]*): GuiceApplicationBuilder
Disable modules by class.
Disable modules by class.
- Definition Classes
- GuiceBuilder
- final def disableCircularProxies(disable: Boolean = true): GuiceApplicationBuilder
Disable circular proxies on the Guice Binder.
Disable circular proxies on the Guice Binder. Without this option, Guice will try to proxy interfaces/traits to break a circular dependency.
Circular proxies are disabled by default. Use disableCircularProxies(false) to allow circular proxies.
- Definition Classes
- GuiceBuilder
- val disabled: Seq[Class[_]]
- val eagerly: Boolean
- final def eagerlyLoaded(): GuiceApplicationBuilder
Set the dependency initialization to eager.
Set the dependency initialization to eager.
- Definition Classes
- GuiceBuilder
- val environment: Environment
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def globalApp(enabled: Boolean): GuiceApplicationBuilder
Sets the configuration key to enable/disable global application state
- final def in(classLoader: ClassLoader): GuiceApplicationBuilder
Set the environment class loader.
Set the environment class loader.
- Definition Classes
- GuiceBuilder
- final def in(mode: Mode): GuiceApplicationBuilder
Set the environment mode.
Set the environment mode.
- Definition Classes
- GuiceBuilder
- final def in(path: File): GuiceApplicationBuilder
Set the environment path.
Set the environment path.
- Definition Classes
- GuiceBuilder
- final def in(env: Environment): GuiceApplicationBuilder
Set the environment.
Set the environment.
- Definition Classes
- GuiceBuilder
- def injector(): Injector
Create a Play Injector backed by Guice using this configured builder.
Create a Play Injector backed by Guice using this configured builder.
- Definition Classes
- GuiceBuilder
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def load(modules: GuiceableModule*): GuiceApplicationBuilder
Override the module loader with the given modules.
- def load(loader: (Environment, Configuration) => Seq[GuiceableModule]): GuiceApplicationBuilder
Set the module loader.
Set the module loader. Overrides the default or any previously configured values.
- def loadConfig(conf: Configuration): GuiceApplicationBuilder
Set the initial configuration.
Set the initial configuration. Overrides the default or any previously configured values.
- def loadConfig(loader: (Environment) => Configuration): GuiceApplicationBuilder
Set the initial configuration loader.
Set the initial configuration loader. Overrides the default or any previously configured values.
- val loadConfiguration: (Environment) => Configuration
- val loadModules: (Environment, Configuration) => Seq[GuiceableModule]
- val modules: Seq[GuiceableModule]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newBuilder(environment: Environment, configuration: Configuration, modules: Seq[GuiceableModule], overrides: Seq[GuiceableModule], disabled: Seq[Class[_]], binderOptions: Set[BinderOption] = binderOptions, eagerly: Boolean): GuiceApplicationBuilder
Implementation of Self creation for GuiceBuilder.
Implementation of Self creation for GuiceBuilder.
- Attributes
- protected
- Definition Classes
- GuiceApplicationBuilder → GuiceBuilder
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def overrides(overrideModules: GuiceableModule*): GuiceApplicationBuilder
Override bindings using Guice modules, Play modules, or Play bindings.
Override bindings using Guice modules, Play modules, or Play bindings.
- Definition Classes
- GuiceBuilder
- See also
GuiceableModuleConversions for the automatically available implicit conversions to GuiceableModule from modules and bindings.
- val overrides: Seq[GuiceableModule]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def registerExceptionHandlers(): Unit
- final def requireAtInjectOnConstructors(require: Boolean = true): GuiceApplicationBuilder
Require @Inject on constructors (even default constructors).
Require @Inject on constructors (even default constructors).
This option is disabled by default.
- Definition Classes
- GuiceBuilder
- final def requireExactBindingAnnotations(require: Boolean = true): GuiceApplicationBuilder
Requires that Guice finds an exactly matching binding annotation.
Requires that Guice finds an exactly matching binding annotation.
Disables the error-prone feature in Guice where it can substitute a binding for @Named Foo when injecting @Named("foo") Foo.
This option is disabled by default.
- Definition Classes
- GuiceBuilder
- final def requireExplicitBindings(require: Boolean = true): GuiceApplicationBuilder
Instructs the injector to only inject classes that are explicitly bound in a module.
Instructs the injector to only inject classes that are explicitly bound in a module.
This option is disabled by default.
- Definition Classes
- GuiceBuilder
- def router(router: Router): GuiceApplicationBuilder
Override the router with the given router.
- def routes(routesFunc: PartialFunction[(String, String), Handler]): GuiceApplicationBuilder
- def shouldDisplayLoggerDeprecationMessage(appConfiguration: Configuration): Boolean
Checks if the path contains the logger path and whether or not one of the keys contains a deprecated value
Checks if the path contains the logger path and whether or not one of the keys contains a deprecated value
- appConfiguration
The app configuration
- returns
Returns true if one of the keys contains a deprecated value, otherwise false
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)