Class

play.api.inject.guice

GuiceApplicationBuilder

Related Doc: package guice

Permalink

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.

Source
GuiceApplicationBuilder.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, GuiceBuilder[GuiceApplicationBuilder], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GuiceApplicationBuilder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. GuiceBuilder
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GuiceApplicationBuilder()

    Permalink
  2. 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)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def additionalRouter(router: Router): GuiceApplicationBuilder

    Permalink

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

  5. def appRoutes(routes: (Application) ⇒ PartialFunction[(String, String), Handler]): GuiceApplicationBuilder

    Permalink

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

  6. def applicationModule(): com.google.inject.Module

    Permalink

    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
    GuiceApplicationBuilderGuiceBuilder
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. val binderOptions: Set[BinderOption]

    Permalink
  9. final def bindings(bindModules: GuiceableModule*): GuiceApplicationBuilder

    Permalink

    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.

  10. def build(): Application

    Permalink

    Create a new Play Application using this configured builder.

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. val configuration: Configuration

    Permalink
  13. final def configure(conf: (String, Any)*): GuiceApplicationBuilder

    Permalink

    Add additional configuration.

    Add additional configuration.

    Definition Classes
    GuiceBuilder
  14. final def configure(conf: Map[String, Any]): GuiceApplicationBuilder

    Permalink

    Add additional configuration.

    Add additional configuration.

    Definition Classes
    GuiceBuilder
  15. final def configure(conf: Configuration): GuiceApplicationBuilder

    Permalink

    Add additional configuration.

    Add additional configuration.

    Definition Classes
    GuiceBuilder
  16. def configureLoggerFactory(configuration: Configuration): ILoggerFactory

    Permalink

    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.

  17. def createModule(): com.google.inject.Module

    Permalink

    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
  18. final def disable[T](implicit tag: ClassTag[T]): GuiceApplicationBuilder

    Permalink

    Disable module by class.

    Disable module by class.

    Definition Classes
    GuiceBuilder
  19. final def disable(moduleClasses: Class[_]*): GuiceApplicationBuilder

    Permalink

    Disable modules by class.

    Disable modules by class.

    Definition Classes
    GuiceBuilder
  20. final def disableCircularProxies(disable: Boolean = true): GuiceApplicationBuilder

    Permalink

    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
  21. val disabled: Seq[Class[_]]

    Permalink
  22. val eagerly: Boolean

    Permalink
  23. final def eagerlyLoaded(): GuiceApplicationBuilder

    Permalink

    Set the dependency initialization to eager.

    Set the dependency initialization to eager.

    Definition Classes
    GuiceBuilder
  24. val environment: Environment

    Permalink
  25. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def globalApp(enabled: Boolean): GuiceApplicationBuilder

    Permalink

    Sets the configuration key to enable/disable global application state

  29. final def in(classLoader: ClassLoader): GuiceApplicationBuilder

    Permalink

    Set the environment class loader.

    Set the environment class loader.

    Definition Classes
    GuiceBuilder
  30. final def in(mode: Mode): GuiceApplicationBuilder

    Permalink

    Set the environment mode.

    Set the environment mode.

    Definition Classes
    GuiceBuilder
  31. final def in(path: File): GuiceApplicationBuilder

    Permalink

    Set the environment path.

    Set the environment path.

    Definition Classes
    GuiceBuilder
  32. final def in(env: Environment): GuiceApplicationBuilder

    Permalink

    Set the environment.

    Set the environment.

    Definition Classes
    GuiceBuilder
  33. def injector(): Injector

    Permalink

    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
  34. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  35. def load(modules: GuiceableModule*): GuiceApplicationBuilder

    Permalink

    Override the module loader with the given modules.

  36. def load(loader: (Environment, Configuration) ⇒ Seq[GuiceableModule]): GuiceApplicationBuilder

    Permalink

    Set the module loader.

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

  37. def loadConfig(conf: Configuration): GuiceApplicationBuilder

    Permalink

    Set the initial configuration.

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

  38. def loadConfig(loader: (Environment) ⇒ Configuration): GuiceApplicationBuilder

    Permalink

    Set the initial configuration loader.

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

  39. val loadConfiguration: (Environment) ⇒ Configuration

    Permalink
  40. val loadModules: (Environment, Configuration) ⇒ Seq[GuiceableModule]

    Permalink
  41. val modules: Seq[GuiceableModule]

    Permalink
  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. def newBuilder(environment: Environment, configuration: Configuration, modules: Seq[GuiceableModule], overrides: Seq[GuiceableModule], disabled: Seq[Class[_]], binderOptions: Set[BinderOption] = binderOptions, eagerly: Boolean): GuiceApplicationBuilder

    Permalink

    Implementation of Self creation for GuiceBuilder.

    Implementation of Self creation for GuiceBuilder.

    Attributes
    protected
    Definition Classes
    GuiceApplicationBuilderGuiceBuilder
  44. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  46. final def overrides(overrideModules: GuiceableModule*): GuiceApplicationBuilder

    Permalink

    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.

  47. val overrides: Seq[GuiceableModule]

    Permalink
  48. final def requireAtInjectOnConstructors(require: Boolean = true): GuiceApplicationBuilder

    Permalink

    Require @Inject on constructors (even default constructors).

    Require @Inject on constructors (even default constructors).

    This option is disabled by default.

    Definition Classes
    GuiceBuilder
  49. final def requireExactBindingAnnotations(require: Boolean = true): GuiceApplicationBuilder

    Permalink

    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
  50. final def requireExplicitBindings(require: Boolean = true): GuiceApplicationBuilder

    Permalink

    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
  51. def router(router: Router): GuiceApplicationBuilder

    Permalink

    Override the router with the given router.

  52. def routes(routesFunc: PartialFunction[(String, String), Handler]): GuiceApplicationBuilder

    Permalink
  53. def shouldDisplayLoggerDeprecationMessage(appConfiguration: Configuration): Boolean

    Permalink

    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

  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  55. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped