GuiceApplicationBuilder

play.api.inject.guice.GuiceApplicationBuilder
final case class GuiceApplicationBuilder(environment: Environment, configuration: Configuration, modules: Seq[GuiceableModule], overrides: Seq[GuiceableModule], disabled: Seq[Class[_]], binderOptions: Set[BinderOption], eagerly: Boolean, loadConfiguration: Environment => Configuration, loadModules: (Environment, Configuration) => Seq[GuiceableModule]) extends GuiceBuilder[GuiceApplicationBuilder]

A builder for creating Applications using Guice.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this()

Concrete methods

Override the router with a router that first tries to route to the passed in additional router, before falling back to the default router.

Override the router with a router that first tries to route to the passed in additional router, before falling back to the default router.

Attributes

Override the router with a fake router having the given routes, before falling back to the default router

Override the router with a fake router having the given routes, before falling back to the default router

Attributes

override def applicationModule(): 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.

Attributes

Definition Classes

Create a new Play Application using this configured builder.

Create a new Play Application using this configured builder.

Attributes

def configureLoggerFactory(configuration: Configuration): ILoggerFactory

Configures the SLF4J logger factory. This is where LoggerConfigurator is called from.

Configures the SLF4J logger factory. This is where LoggerConfigurator is called from.

Value parameters

configuration

play.api.Configuration

Attributes

Returns

the app wide ILoggerFactory. Useful for testing and DI.

Sets the configuration key to enable/disable global application state

Sets the configuration key to enable/disable global application state

Attributes

Set the module loader. Overrides the default or any previously configured values.

Set the module loader. Overrides the default or any previously configured values.

Attributes

Override the module loader with the given modules.

Override the module loader with the given modules.

Attributes

Set the initial configuration loader. Overrides the default or any previously configured values.

Set the initial configuration loader. Overrides the default or any previously configured values.

Attributes

Set the initial configuration. Overrides the default or any previously configured values.

Set the initial configuration. Overrides the default or any previously configured values.

Attributes

Override the router with the given router.

Override the router with the given router.

Attributes

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

Value parameters

appConfiguration

The app configuration

Attributes

Returns

Returns true if one of the keys contains a deprecated value, otherwise false

Inherited methods

final def bindings(bindModules: GuiceableModule*): Self

Add Guice modules, Play modules, or Play bindings.

Add Guice modules, Play modules, or Play bindings.

Attributes

See also

GuiceableModuleConversions for the automatically available implicit conversions to GuiceableModule from modules and bindings.

Inherited from:
GuiceBuilder
final def configure(conf: (String, Any)*): Self

Add additional configuration.

Add additional configuration.

Attributes

Inherited from:
GuiceBuilder
final def configure(conf: Map[String, Any]): Self

Add additional configuration.

Add additional configuration.

Attributes

Inherited from:
GuiceBuilder
final def configure(conf: Configuration): Self

Add additional configuration.

Add additional configuration.

Attributes

Inherited from:
GuiceBuilder
def createModule(): Module

Creation of the Guice Module used by the injector. Libraries like Guiceberry and Jukito that want to handle injector creation may find this helpful.

Creation of the Guice Module used by the injector. Libraries like Guiceberry and Jukito that want to handle injector creation may find this helpful.

Attributes

Inherited from:
GuiceBuilder
final def disable[T](implicit tag: ClassTag[T]): Self

Disable module by class.

Disable module by class.

Attributes

Inherited from:
GuiceBuilder
final def disable(moduleClasses: Class[_]*): Self

Disable modules by class.

Disable modules by class.

Attributes

Inherited from:
GuiceBuilder
final def disableCircularProxies(disable: Boolean): Self

Disable circular proxies on the Guice Binder. Without this option, Guice will try to proxy interfaces/traits to break a circular dependency.

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.

Attributes

Inherited from:
GuiceBuilder
final def eagerlyLoaded(): Self

Set the dependency initialization to eager.

Set the dependency initialization to eager.

Attributes

Inherited from:
GuiceBuilder
final def in(classLoader: ClassLoader): Self

Set the environment class loader.

Set the environment class loader.

Attributes

Inherited from:
GuiceBuilder
final def in(mode: Mode): Self

Set the environment mode.

Set the environment mode.

Attributes

Inherited from:
GuiceBuilder
final def in(path: File): Self

Set the environment path.

Set the environment path.

Attributes

Inherited from:
GuiceBuilder
final def in(env: Environment): Self

Set the environment.

Set the environment.

Attributes

Inherited from:
GuiceBuilder

Create a Play Injector backed by Guice using this configured builder.

Create a Play Injector backed by Guice using this configured builder.

Attributes

Inherited from:
GuiceBuilder
final def overrides(overrideModules: GuiceableModule*): Self

Override bindings using Guice modules, Play modules, or Play bindings.

Override bindings using Guice modules, Play modules, or Play bindings.

Attributes

See also

GuiceableModuleConversions for the automatically available implicit conversions to GuiceableModule from modules and bindings.

Inherited from:
GuiceBuilder

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
final def requireAtInjectOnConstructors(require: Boolean): Self

Require @Inject on constructors (even default constructors).

Require @Inject on constructors (even default constructors).

This option is disabled by default.

Attributes

Inherited from:
GuiceBuilder
final def requireExactBindingAnnotations(require: Boolean): Self

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.``

Attributes

Inherited from:
GuiceBuilder
final def requireExplicitBindings(require: Boolean): Self

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.

Attributes

Inherited from:
GuiceBuilder