Package play.inject
Class Binding<T>
java.lang.Object
play.inject.Binding<T>
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 jakarta.inject.Singleton, then the binding may declare itself to be eagerly instantiated. In which case, it should be eagerly instantiated when Play starts up.
See the Module class for information on how to provide bindings.
-
Constructor Summary
ConstructorsConstructorDescriptionBinding(BindingKey<T> key, Optional<BindingTarget<T>> target, Optional<Class<? extends Annotation>> scope, Boolean eager, Object source) -
Method Summary
-
Constructor Details
-
Binding
public Binding(BindingKey<T> key, Optional<BindingTarget<T>> target, Optional<Class<? extends Annotation>> scope, Boolean eager, Object source) - Parameters:
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.
-
Binding
-
-
Method Details