public final class Binding<T> extends Object
Module class for information on how to provide bindings.| Constructor and Description |
|---|
Binding(play.api.inject.Binding<T> underlying) |
Binding(BindingKey<T> key,
Optional<BindingTarget<T>> target,
Optional<Class<? extends Annotation>> scope,
Boolean eager,
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.
|
Boolean |
getEager() |
BindingKey<T> |
getKey() |
Optional<Class<? extends Annotation>> |
getScope() |
Object |
getSource() |
Optional<BindingTarget<T>> |
getTarget() |
<A extends Annotation> |
in(Class<A> scope)
Configure the scope for this binding.
|
String |
toString() |
public Binding(BindingKey<T> key, Optional<BindingTarget<T>> target, Optional<Class<? extends Annotation>> scope, Boolean eager, 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 Optional<BindingTarget<T>> getTarget()
public Optional<Class<? extends Annotation>> getScope()
public Boolean getEager()
public Object getSource()
public <A extends Annotation> Binding<T> in(Class<A> scope)
public play.api.inject.Binding<T> asScala()