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

Instance Constructors

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

    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. def asJava: inject.Binding[T]
  2. val eager: Boolean
  3. def eagerly(): Binding[T]

    Eagerly instantiate this binding when Play starts up.

  4. def in[A <: Annotation](implicit arg0: ClassTag[A]): Binding[T]

    Configure the scope for this binding.

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

    Configure the scope for this binding.

  6. val key: BindingKey[T]
  7. def productElementNames: Iterator[String]
    Definition Classes
    Product
  8. val scope: Option[Class[_ <: Annotation]]
  9. val source: AnyRef
  10. val target: Option[BindingTarget[T]]
  11. def toString(): String
    Definition Classes
    Binding → AnyRef → Any