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.

    Access the current Play application
    import play.api.Play.current
    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

package guice

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract class BinderOption extends (Binder) => Unit
  2. 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.

  3. class GuiceApplicationLoader extends ApplicationLoader

    An ApplicationLoader that uses Guice to bootstrap the application.

    An ApplicationLoader that uses Guice to bootstrap the application.

    Subclasses can override the builder and overrides methods.

  4. abstract class GuiceBuilder[Self] extends AnyRef

    A builder for creating Guice-backed Play Injectors.

  5. class GuiceClassLoader extends AnyRef

    An object that holds a ClassLoader for Guice to use.

    An object that holds a ClassLoader for Guice to use. We use this simple value object so it can be looked up by its type when we're assembling the Guice injector.

  6. class GuiceInjector extends Injector

    Play Injector backed by a Guice Injector.

  7. final class GuiceInjectorBuilder extends GuiceBuilder[GuiceInjectorBuilder]

    Default empty builder for creating Guice-backed Injectors.

  8. class GuiceInjectorWithClassLoaderProvider extends Provider[Injector]

    A provider for a Guice injector that wraps the injector to ensure it uses the correct ClassLoader.

  9. class GuiceLoadException extends RuntimeException
  10. trait GuiceableModule extends AnyRef

    Magnet pattern for creating Guice modules from Play modules or bindings.

  11. trait GuiceableModuleConversions extends AnyRef

    Implicit conversions to GuiceableModules.

Value Members

  1. object BinderOption
  2. object GuiceApplicationLoader
  3. object GuiceKey

    Conversion from Play BindingKey to Guice Key.

  4. object GuiceableModule extends GuiceableModuleConversions

    Loading and converting Guice modules.

Ungrouped