public class ActivationExtension extends Object implements javax.enterprise.inject.spi.Extension, Deactivatable
This class implements the logic for handling
ProjectStageActivated
annotations.
We simply listen for all annotated types to get scanned, and
if it has a ProjectStageActivated
annotation but the
the current ProjectStage
is not in the list, we simply
veto that bean.
Constructor and Description |
---|
ActivationExtension() |
Modifier and Type | Method and Description |
---|---|
protected void |
initProjectStage(javax.enterprise.inject.spi.AfterDeploymentValidation afterDeploymentValidation) |
boolean |
isActivated() |
protected void |
vetoAlternativeTypes(javax.enterprise.inject.spi.ProcessAnnotatedType processAnnotatedType)
Check if the
AnnotatedType is an @Alternative and
is not disabled for the current ProjectStage . |
protected void initProjectStage(@Observes javax.enterprise.inject.spi.AfterDeploymentValidation afterDeploymentValidation)
protected void vetoAlternativeTypes(@Observes javax.enterprise.inject.spi.ProcessAnnotatedType processAnnotatedType)
AnnotatedType
is an @Alternative and
is not disabled for the current ProjectStage
.public boolean isActivated()
isActivated
in interface Deactivatable
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.