Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package inject

    Play's runtime dependency injection abstraction.

    Play's runtime dependency injection abstraction.

    Play's runtime dependency injection support is built on JSR-330, which provides a specification for declaring how dependencies get wired to components. JSR-330 however does not address how components are provided to or located by a DI container. Play's API seeks to address this in a DI container agnostic way.

    The reason for providing this abstraction is so that Play, the modules it provides, and third party modules can all express their bindings in a way that is not specific to any one DI container.

    Components are bound in the DI container. Each binding is identified by a BindingKey, which is typically an interface that the component implements, and may be optionally qualified by a JSR-330 qualifier annotation. A binding key is bound to a BindingTarget, which describes how the implementation of the interface that the binding key represents is constructed or provided. Bindings may also be scoped using JSR-330 scope annotations.

    Bindings are provided by instances of Module.

    Out of the box, Play provides an implementation of this abstraction using Guice.

    Definition Classes
    api
    See also

    The Module class for information on how to provide bindings.

  • package guice
    Definition Classes
    inject
  • BinderOption
  • GuiceApplicationBuilder
  • GuiceApplicationLoader
  • GuiceBuilder
  • GuiceClassLoader
  • GuiceInjector
  • GuiceInjectorBuilder
  • GuiceInjectorWithClassLoaderProvider
  • GuiceKey
  • GuiceLoadException
  • GuiceableModule
  • GuiceableModuleConversions
c

play.api.inject.guice

GuiceApplicationBuilder

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, Product, Equals, GuiceBuilder[GuiceApplicationBuilder], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GuiceApplicationBuilder
  2. Serializable
  3. Product
  4. Equals
  5. GuiceBuilder
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new GuiceApplicationBuilder()
  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)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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.

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

  6. 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
    GuiceApplicationBuilderGuiceBuilder
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. val binderOptions: Set[BinderOption]
  9. 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.

  10. def build(): Application

    Create a new Play Application using this configured builder.

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  12. val configuration: Configuration
  13. final def configure(conf: (String, Any)*): GuiceApplicationBuilder

    Add additional configuration.

    Add additional configuration.

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

    Add additional configuration.

    Add additional configuration.

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

    Add additional configuration.

    Add additional configuration.

    Definition Classes
    GuiceBuilder
  16. 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.

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

    Disable module by class.

    Disable module by class.

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

    Disable modules by class.

    Disable modules by class.

    Definition Classes
    GuiceBuilder
  20. 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
  21. val disabled: Seq[Class[_]]
  22. val eagerly: Boolean
  23. final def eagerlyLoaded(): GuiceApplicationBuilder

    Set the dependency initialization to eager.

    Set the dependency initialization to eager.

    Definition Classes
    GuiceBuilder
  24. val environment: Environment
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  27. def globalApp(enabled: Boolean): GuiceApplicationBuilder

    Sets the configuration key to enable/disable global application state

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

    Set the environment class loader.

    Set the environment class loader.

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

    Set the environment mode.

    Set the environment mode.

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

    Set the environment path.

    Set the environment path.

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

    Set the environment.

    Set the environment.

    Definition Classes
    GuiceBuilder
  32. 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
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. def load(modules: GuiceableModule*): GuiceApplicationBuilder

    Override the module loader with the given modules.

  35. def load(loader: (Environment, Configuration) => Seq[GuiceableModule]): GuiceApplicationBuilder

    Set the module loader.

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

  36. def loadConfig(conf: Configuration): GuiceApplicationBuilder

    Set the initial configuration.

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

  37. def loadConfig(loader: (Environment) => Configuration): GuiceApplicationBuilder

    Set the initial configuration loader.

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

  38. val loadConfiguration: (Environment) => Configuration
  39. val loadModules: (Environment, Configuration) => Seq[GuiceableModule]
  40. val modules: Seq[GuiceableModule]
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. 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
    GuiceApplicationBuilderGuiceBuilder
  43. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  44. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  45. 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.

  46. val overrides: Seq[GuiceableModule]
  47. def productElementNames: Iterator[String]
    Definition Classes
    Product
  48. def registerExceptionHandlers(): Unit
  49. 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
  50. 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
  51. 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
  52. def router(router: Router): GuiceApplicationBuilder

    Override the router with the given router.

  53. def routes(routesFunc: PartialFunction[(String, String), Handler]): GuiceApplicationBuilder
  54. 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

  55. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  58. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped