Annotation Interface Factory


@Documented @Target(METHOD) @Retention(RUNTIME) @API(status=STABLE, since="1.0") public @interface Factory
Binds the annotated method as a factory method for the return type of the method. Arguments supplied to the factory methods are taken from the associated Injector. A factory method must be static and returning a type other than void. The can have any access modifier (public, protected, private, ...). Factory methods are singleton aware, meaning that if the return type is marked as Singleton the factory method will only get called once per injector inheritance (child injectors will use the instantiated binding of parent injectors).
Since:
1.0