@Retention(value=RUNTIME) @Target(value=TYPE) public @interface ProjectStageActivated
Use this annotation, e.g. in conjunction with Alternative
to 'disable' the @Alternative based on the current ProjectStage.
Please note that you still have to add all alternative beans to the respective beans.xml <alternatives> section.
@ProjectStageActivated can also be used to veto other kind of beans.
Example Usage:
@Alternative @ProjectStageActivated({ProjectStage.Development.class, ProjectStage.UnitTest.class}) @ApplicationScoped public class MockMailServiceImpl implements MailService {...}
Modifier and Type | Required Element and Description |
---|---|
Class<? extends ProjectStage>[] |
value
The
ProjectStage s
which lead to activating this alternative bean. |
public abstract Class<? extends ProjectStage>[] value
ProjectStage
s
which lead to activating this alternative bean.
If the current ProjectStage is not in this list, the bean will get vetoed.Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.