public interface LenskitConfigContext extends Context
LensKit-specific augmentations of the Grapht context interface.
<T> LenskitBinding<T> bind(Class<T> type)
<T> LenskitBinding<T> bind(Class<? extends Annotation> qual, Class<T> type)
<T> LenskitBinding<T> bindAny(Class<T> type)
Binding set(Class<? extends 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 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 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(Class<?> type)
@Deprecated LenskitConfigContext in(@Nullable Class<? extends Annotation> qualifier, Class<?> type)
@Deprecated LenskitConfigContext in(@Nullable Annotation qualifier, Class<?> type)
LenskitConfigContext within(Class<?> type)
LenskitConfigContext within(@Nullable Class<? extends Annotation> qualifier, Class<?> type)
LenskitConfigContext within(@Nullable Annotation qualifier, Class<?> type)
LenskitConfigContext matching(ContextPattern pattern)
LenskitConfigContext at(Class<?> type)
LenskitConfigContext at(@Nullable Class<? extends Annotation> qualifier, Class<?> type)
LenskitConfigContext at(@Nullable Annotation qualifier, Class<?> type)