@Target(value={METHOD,CONSTRUCTOR,FIELD})
@Retention(value=RUNTIME)
@Documented
public @interface Inject
Injector
should inject values. The Injector fulfills injection requests for:
@Inject
or must have a constructor taking no parameters. The
Injector then proceeds to perform field and method injections.
Injector.injectMembers(java.lang.Object)
, LinkedBindingBuilder.toInstance(Object)
and LinkedBindingBuilder.toProvider(javax.inject.Provider)
. In this
case all constructors are, of course, ignored.
Module
has specifically requested
static injection for, using Binder.requestStaticInjection(java.lang.Class<?>...)
.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
optional
If true, and the appropriate binding is not found, the Injector will skip injection of this
method or field rather than produce an error.
|
public abstract boolean optional