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.
- Alphabetic
- By Inheritance
- Binding
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: inject.Binding[T]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val eager: Boolean
- def eagerly(): Binding[T]
Eagerly instantiate this binding when Play starts up.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def in[A <: Annotation](implicit arg0: ClassTag[A]): Binding[T]
Configure the scope for this binding.
- def in[A <: Annotation](scope: Class[A]): Binding[T]
Configure the scope for this binding.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val key: BindingKey[T]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val scope: Option[Class[_ <: Annotation]]
- val source: AnyRef
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val target: Option[BindingTarget[T]]
- def toString(): String
- Definition Classes
- Binding → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()