A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.playframework.com/documentation/2.5.x/api/scala/play/api/inject/BindingKey.html below:

BindingKey - play.api.inject.BindingKey

  • 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
  • val clazz: Class[T]

    The class to bind.

  • def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  • def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  • final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  • final def isInstanceOf[T0]: Boolean
  • final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  • final def notify(): Unit
    Definition Classes
    AnyRef
  • final def notifyAll(): Unit
    Definition Classes
    AnyRef
  • def qualifiedWith(name: String): BindingKey[T]

    Qualify this binding key with the given name.

    Qualify this binding key with the given name.

    For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate between them, you may decide to name the cached one:

    bind[Foo].qualifiedWith("cached").to[FooCached],
    bind[Foo].to[FooImpl]
    
    ...
    
    class MyController @Inject() (@Named("cached") foo: Foo) {
      ...
    }

    In the above example, the controller will get the cached Foo service.

  • def qualifiedWith[A <: Annotation](implicit arg0: ClassTag[A]): BindingKey[T]

    Qualify this binding key with the given annotation.

    Qualify this binding key with the given annotation.

    For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate between them, you may define a Cached annotation:

    import scala.annotation._
    
    @target.param
    class Cached extends StaticAnnotation
    
    ...
    
    bind[Foo].qualifiedWith[Cached].to[FooCached],
    bind[Foo].to[FooImpl]
    
    ...
    
    class MyController @Inject() (@Cached foo: Foo) {
      ...
    }

    In the above example, the controller will get the cached Foo service.

  • def qualifiedWith[A <: Annotation](annotation: Class[A]): BindingKey[T]

    Qualify this binding key with the given annotation.

    Qualify this binding key with the given annotation.

    For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate between them, you may define a Cached annotation:

    import scala.annotation._
    
    @target.param
    class Cached extends StaticAnnotation
    
    ...
    
    bind[Foo].qualifiedWith(classOf[Cached]).to[FooCached],
    bind[Foo].to[FooImpl]
    
    ...
    
    class MyController @Inject() (@Cached foo: Foo) {
      ...
    }

    In the above example, the controller will get the cached Foo service.

  • def qualifiedWith[A <: Annotation](instance: A): BindingKey[T]

    Qualify this binding key with the given instance of an annotation.

    Qualify this binding key with the given instance of an annotation.

    This can be used to specify bindings with annotations that have particular values.

  • val qualifier: Option[QualifierAnnotation]

    An optional qualifier.

  • final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  • def to(key: BindingKey[_ <: T]): Binding[T]

    Bind this binding key to another binding key.

  • def to[A <: T](instance: ⇒ A): Binding[T]

    Bind this binding key to the given instance.

  • def to(provider: Provider[_ <: T]): Binding[T]

    Bind this binding key to the given provider instance.

    Bind this binding key to the given provider instance.

    This provider instance will be invoked to obtain the implementation for the key.

  • def to[C <: T](implicit arg0: ClassTag[C]): Binding[T]

    Bind this binding key to the given implementation class.

    Bind this binding key to the given implementation class.

    This class will be instantiated and injected by the injection framework.

  • def to(implementation: Class[_ <: T]): Binding[T]

    Bind this binding key to the given implementation class.

    Bind this binding key to the given implementation class.

    This class will be instantiated and injected by the injection framework.

  • def toInstance(instance: T): Binding[T]

    Bind this binding key to the given instance.

  • def toProvider[P <: Provider[_ <: T]](implicit arg0: ClassTag[P]): Binding[T]

    Bind this binding key to the given provider class.

    Bind this binding key to the given provider class.

    The dependency injection framework will instantiate and inject this provider, and then invoke its get method whenever an instance of the class is needed.

  • def toProvider[P <: Provider[_ <: T]](provider: Class[P]): Binding[T]

    Bind this binding key to the given provider class.

    Bind this binding key to the given provider class.

    The dependency injection framework will instantiate and inject this provider, and then invoke its get method whenever an instance of the class is needed.

  • def toSelf: Binding[T]

    Bind this binding key to itself.

  • def toString(): String
  • final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

  • RetroSearch is an open source project built by @garambo | Open a GitHub Issue

    Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

    HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4