public final class Binding<T>
extends java.lang.Object
Module
class for information on how to provide bindings.Constructor and Description |
---|
Binding(play.api.inject.Binding<T> underlying) |
Binding(BindingKey<T> key,
java.util.Optional<BindingTarget<T>> target,
java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> scope,
java.lang.Boolean eager,
java.lang.Object source) |
Modifier and Type | Method and Description |
---|---|
play.api.inject.Binding<T> |
asScala() |
Binding<T> |
eagerly()
Eagerly instantiate this binding when Play starts up.
|
java.lang.Boolean |
getEager() |
BindingKey<T> |
getKey() |
java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getScope() |
java.lang.Object |
getSource() |
java.util.Optional<BindingTarget<T>> |
getTarget() |
<A extends java.lang.annotation.Annotation> |
in(java.lang.Class<A> scope)
Configure the scope for this binding.
|
java.lang.String |
toString() |
public Binding(BindingKey<T> key, java.util.Optional<BindingTarget<T>> target, java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> scope, java.lang.Boolean eager, java.lang.Object source)
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.public Binding(play.api.inject.Binding<T> underlying)
public BindingKey<T> getKey()
public java.util.Optional<BindingTarget<T>> getTarget()
public java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getScope()
public java.lang.Boolean getEager()
public java.lang.Object getSource()
public <A extends java.lang.annotation.Annotation> Binding<T> in(java.lang.Class<A> scope)
public java.lang.String toString()
toString
in class java.lang.Object
public play.api.inject.Binding<T> asScala()