Annotation Type AutoFactory


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface AutoFactory
Indicates that the annotated type will be used as a factory. The type must be an interface or Injector will throw an exception.

Injector will inject an object implementing the annotated interface. When a method on the interface is called, a scoped injector will be created, any parameters passed to the method will be explicitly bound, and an implementation of the method's return type will be computed and returned.