public interface LenskitConfigContext extends Context
LensKit-specific augmentations of the Grapht context interface.
Modifier and Type | Method and Description |
---|---|
void |
addComponent(java.lang.Class<?> type)
Add a component type to the injector.
|
void |
addComponent(java.lang.Object obj)
Add a component object to the injector.
|
LenskitConfigContext |
at(java.lang.annotation.Annotation qualifier,
java.lang.Class<?> type) |
LenskitConfigContext |
at(java.lang.Class<?> type) |
LenskitConfigContext |
at(java.lang.Class<? extends java.lang.annotation.Annotation> qualifier,
java.lang.Class<?> type) |
<T> LenskitBinding<T> |
bind(java.lang.Class<? extends java.lang.annotation.Annotation> qual,
java.lang.Class<T> type) |
<T> LenskitBinding<T> |
bind(java.lang.Class<T> type) |
<T> LenskitBinding<T> |
bindAny(java.lang.Class<T> type) |
LenskitConfigContext |
in(java.lang.annotation.Annotation qualifier,
java.lang.Class<?> type)
Deprecated.
|
LenskitConfigContext |
in(java.lang.Class<?> type)
Deprecated.
|
LenskitConfigContext |
in(java.lang.Class<? extends java.lang.annotation.Annotation> qualifier,
java.lang.Class<?> type)
Deprecated.
|
LenskitConfigContext |
matching(ContextPattern pattern) |
Binding |
set(java.lang.Class<? extends java.lang.annotation.Annotation> param)
Start a binding that sets a parameter.
|
LenskitConfigContext |
within(java.lang.annotation.Annotation qualifier,
java.lang.Class<?> type) |
LenskitConfigContext |
within(java.lang.Class<?> type) |
LenskitConfigContext |
within(java.lang.Class<? extends java.lang.annotation.Annotation> qualifier,
java.lang.Class<?> type) |
<T> LenskitBinding<T> bind(java.lang.Class<T> type)
<T> LenskitBinding<T> bind(java.lang.Class<? extends java.lang.annotation.Annotation> qual, java.lang.Class<T> type)
<T> LenskitBinding<T> bindAny(java.lang.Class<T> type)
Binding set(java.lang.Class<? extends java.lang.annotation.Annotation> param)
Start a binding that sets a parameter. Parameters are qualifiers that bear the Parameter
annotation.
param
- The parameter to set.void addComponent(@Nonnull java.lang.Object obj)
Add a component object to the injector. This is the equivalent of:
this.bind(obj.getClass()).to(obj);
It has the result of making obj
available satisfy dependencies on its class or, via supertype binding generation, any of its supertypes. Explicit bindings for those supertypes will override this binding.
obj
- The object to register.void addComponent(@Nonnull java.lang.Class<?> type)
Add a component type to the injector. This is the equivalent of:
this.bind(type).to(type);
It has the result of making type
available satisfy dependencies on itself or, via supertype binding generation, any of its supertypes. Explicit bindings for those supertypes will override this binding.
type
- The type to register.@Deprecated LenskitConfigContext in(java.lang.Class<?> type)
@Deprecated LenskitConfigContext in(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> qualifier, java.lang.Class<?> type)
@Deprecated LenskitConfigContext in(@Nullable java.lang.annotation.Annotation qualifier, java.lang.Class<?> type)
LenskitConfigContext within(java.lang.Class<?> type)
LenskitConfigContext within(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> qualifier, java.lang.Class<?> type)
LenskitConfigContext within(@Nullable java.lang.annotation.Annotation qualifier, java.lang.Class<?> type)
LenskitConfigContext matching(ContextPattern pattern)
LenskitConfigContext at(java.lang.Class<?> type)
LenskitConfigContext at(@Nullable java.lang.Class<? extends java.lang.annotation.Annotation> qualifier, java.lang.Class<?> type)
LenskitConfigContext at(@Nullable java.lang.annotation.Annotation qualifier, java.lang.Class<?> type)