c

play.api.inject.guice

GuiceBuilder

abstract class GuiceBuilder[Self] extends AnyRef

A builder for creating Guice-backed Play Injectors.

Source
GuiceInjectorBuilder.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GuiceBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Concrete Value Members

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

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

  2. final def bindings(bindModules: GuiceableModule*): Self

    Add Guice modules, Play modules, or Play bindings.

    Add Guice modules, Play modules, or Play bindings.

    See also

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

  3. final def configure(conf: (String, Any)*): Self

    Add additional configuration.

  4. final def configure(conf: Map[String, Any]): Self

    Add additional configuration.

  5. final def configure(conf: Configuration): Self

    Add additional configuration.

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

  7. final def disable[T](implicit tag: ClassTag[T]): Self

    Disable module by class.

  8. final def disable(moduleClasses: Class[_]*): Self

    Disable modules by class.

  9. final def disableCircularProxies(disable: Boolean = true): Self

    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.

  10. final def eagerlyLoaded(): Self

    Set the dependency initialization to eager.

  11. final def in(classLoader: ClassLoader): Self

    Set the environment class loader.

  12. final def in(mode: Mode): Self

    Set the environment mode.

  13. final def in(path: File): Self

    Set the environment path.

  14. final def in(env: Environment): Self

    Set the environment.

  15. def injector(): Injector

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

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

    See also

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

  17. final def requireAtInjectOnConstructors(require: Boolean = true): Self

    Require @Inject on constructors (even default constructors).

    Require @Inject on constructors (even default constructors).

    This option is disabled by default.

  18. final def requireExactBindingAnnotations(require: Boolean = true): 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.

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