org.qi4j.api.injection.scope
Annotation Type Uses


@Retention(value=RUNTIME)
@Target(value={PARAMETER,FIELD})
@Documented
@InjectionScope
public @interface Uses

Annotation to denote the injection of a dependency to be used by a Mixin. The injected object is provided either by the TransientBuilder.uses() declarations, or if an instance of the appropriate types is not found, then a new Transient or Object is instantiated. Call TransientBuilder.use(java.lang.Object...) to provide the instance to be injected. Example:

@Uses SomeType someInstance