org.apache.myfaces.extensions.cdi.core.impl.activation
Class ActivationExtension

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.core.impl.activation.ActivationExtension
All Implemented Interfaces:
javax.enterprise.inject.spi.Extension, Deactivatable

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 Summary
ActivationExtension()
           
 
Method Summary
protected  void initProjectStage(javax.enterprise.inject.spi.AfterDeploymentValidation afterDeploymentValidation)
           
 boolean isActivated()
          
protected  void vetoAlternativeTypes(javax.enterprise.inject.spi.ProcessAnnotatedType<Object> processAnnotatedType)
          Check if the AnnotatedType is an @Alternative and is not disabled for the current ProjectStage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivationExtension

public ActivationExtension()
Method Detail

initProjectStage

protected void initProjectStage(@Observes
                                javax.enterprise.inject.spi.AfterDeploymentValidation afterDeploymentValidation)

vetoAlternativeTypes

protected void vetoAlternativeTypes(@Observes
                                    javax.enterprise.inject.spi.ProcessAnnotatedType<Object> processAnnotatedType)
Check if the AnnotatedType is an @Alternative and is not disabled for the current ProjectStage.


isActivated

public boolean isActivated()

Specified by:
isActivated in interface Deactivatable


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.