javax.enterprise.inject
Annotation Type New
@Qualifier
@Documented
@Retention(value=RUNTIME)
@Target(value={FIELD,PARAMETER,METHOD,TYPE})
public @interface New
New bean creation and injection uses the @New annotation as the
@Qualifier
for the injection point.
The @New annotation injects a new instance of a bean to
the injection
point. The configuration for the @New instance is separate
from any
simple bean configuration.
- Initializer methods and injected fields are defined by annotations.
- Interceptor bindings are defined by annotations.
- Scope is
@Dependent
- Deployment type is
@Standard
- The binding is @New
- No bean
@Named
- No
@Stereotypes
- No
@Observer
methods,
@Produces
methods, or
@Disposes
methods
example: @New injection
class MyBean {
@New
private SubBean _bean;
}
Optional Element Summary |
java.lang.Class<?> |
value
|
value
public abstract java.lang.Class<?> value
- Default:
- javax.enterprise.inject.New.class