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.

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