Class

play.api.inject

Binding

Related Doc: package inject

Permalink

final case class Binding[T](key: BindingKey[T], target: Option[BindingTarget[T]], scope: Option[Class[_ <: Annotation]], eager: Boolean, source: AnyRef) extends Product with Serializable

A binding.

Bindings are used to bind classes, optionally qualified by a JSR-330 qualifier annotation, to instances, providers or implementation classes.

Bindings may also specify a JSR-330 scope. If, and only if that scope is javax.inject.Singleton, then the binding may declare itself to be eagerly instantiated. In which case, it should be eagerly instantiated when Play starts up.

key

The binding key.

target

The binding target.

scope

The JSR-330 scope.

eager

Whether the binding should be eagerly instantiated.

source

Where this object was bound. Used in error reporting.

Source
Binding.scala
See also

The Module class for information on how to provide bindings.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Binding
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Binding(key: BindingKey[T], target: Option[BindingTarget[T]], scope: Option[Class[_ <: Annotation]], eager: Boolean, source: AnyRef)

    Permalink

    key

    The binding key.

    target

    The binding target.

    scope

    The JSR-330 scope.

    eager

    Whether the binding should be eagerly instantiated.

    source

    Where this object was bound. Used in error reporting.

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

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val eager: Boolean

    Permalink

    Whether the binding should be eagerly instantiated.

  7. def eagerly(): Binding[T]

    Permalink

    Eagerly instantiate this binding when Play starts up.

  8. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def in[A <: Annotation](implicit arg0: ClassTag[A]): Binding[T]

    Permalink

    Configure the scope for this binding.

  12. def in[A <: Annotation](scope: Class[A]): Binding[T]

    Permalink

    Configure the scope for this binding.

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val key: BindingKey[T]

    Permalink

    The binding key.

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  18. val scope: Option[Class[_ <: Annotation]]

    Permalink

    The JSR-330 scope.

  19. val source: AnyRef

    Permalink

    Where this object was bound.

    Where this object was bound. Used in error reporting.

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

    Permalink
    Definition Classes
    AnyRef
  21. val target: Option[BindingTarget[T]]

    Permalink

    The binding target.

  22. def toString(): String

    Permalink
    Definition Classes
    Binding → AnyRef → Any
  23. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. 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