Package javax.enterprise.event

Examples of javax.enterprise.event.Observes


        //check for null
        if(observableMethods != null)
        {
            for (Method observableMethod : observableMethods)
            {
                Observes observes = AnnotationUtil.getMethodFirstParameterAnnotation(observableMethod, Observes.class);

                boolean ifExist = false;

                if (observes.notifyObserver().equals(Reception.IF_EXISTS))
                {
                    ifExist = true;
                }

                ObserverMethodImpl<T> observer = new ObserverMethodImpl(component, observableMethod, ifExist);
View Full Code Here


     */
    public <T> ObserverMethod<?> getObservableMethodForAnnotatedMethod(AnnotatedMethod<?> annotatedMethod, InjectionTargetBean<T> bean)
    {
        Asserts.assertNotNull(annotatedMethod, "annotatedMethod parameter can not be null");

        Observes observes = AnnotationUtil.getAnnotatedMethodFirstParameterAnnotation(annotatedMethod, Observes.class);
        boolean ifExist = false;
        if(observes != null)
        {
            if (observes.notifyObserver().equals(Reception.IF_EXISTS))
            {
                ifExist = true;
            }           
        }
       
View Full Code Here

        webBeansContext.getAnnotationManager().checkQualifierConditions(annotations);
    }

    public static TransactionPhase getObserverMethodTransactionType(Method observerMethod)
    {
        Observes observes = AnnotationUtil.getMethodFirstParameterAnnotation(observerMethod, Observes.class);
        if (observes != null)
        {
            return observes.during();
        }
       
        return null;
    }
View Full Code Here

        }               
    }
   
    public static boolean isReceptionIfExist(Method observerMethod)
    {
        Observes observes = AnnotationUtil.getMethodFirstParameterAnnotation(observerMethod, Observes.class);
        Reception reception = observes.notifyObserver();
        if(reception.equals(Reception.IF_EXISTS))
        {
            return true;
        }
View Full Code Here

                if(bean.getScope().equals(Dependent.class))
                {
                    //Check Reception
                     AnnotationUtil.getAnnotatedMethodFirstParameterWithAnnotation(annotatedMethod, Observes.class);
                   
                     Observes observes = AnnotationUtil.getAnnotatedMethodFirstParameterAnnotation(annotatedMethod, Observes.class);
                     Reception reception = observes.notifyObserver();
                     if(reception.equals(Reception.IF_EXISTS))
                     {
                         throw new WebBeansConfigurationException("Dependent Bean : " + bean + " can not define observer method with @Receiver = IF_EXIST");
                     }
                }
View Full Code Here

     */
    public <T> ObserverMethod<?> getObservableMethodForAnnotatedMethod(AnnotatedMethod<?> annotatedMethod, InjectionTargetBean<T> bean)
    {
        Asserts.assertNotNull(annotatedMethod, "annotatedMethod parameter can not be null");

        Observes observes = AnnotationUtil.getAnnotatedMethodFirstParameterAnnotation(annotatedMethod, Observes.class);
        boolean ifExist = false;
        if(observes != null)
        {
            if (observes.notifyObserver().equals(Reception.IF_EXISTS))
            {
                ifExist = true;
            }           
        }
       
View Full Code Here

        AnnotationUtil.checkQualifierConditions(annotations);
    }

    public static TransactionPhase getObserverMethodTransactionType(Method observerMethod)
    {
        Observes observes = AnnotationUtil.getMethodFirstParameterAnnotation(observerMethod, Observes.class);
        if (observes != null)
        {
            return observes.during();
        }
       
        return null;
    }
View Full Code Here

        }               
    }
   
    public static boolean isReceptionIfExist(Method observerMethod)
    {
        Observes observes = AnnotationUtil.getMethodFirstParameterAnnotation(observerMethod, Observes.class);
        Reception reception = observes.notifyObserver();
        if(reception.equals(Reception.IF_EXISTS))
        {
            return true;
        }
View Full Code Here

                if(bean.getScope().equals(Dependent.class))
                {
                    //Check Reception
                     AnnotationUtil.getAnnotatedMethodFirstParameterWithAnnotation(annotatedMethod, Observes.class);
                   
                     Observes observes = AnnotationUtil.getAnnotatedMethodFirstParameterAnnotation(annotatedMethod, Observes.class);
                     Reception reception = observes.notifyObserver();
                     if(reception.equals(Reception.IF_EXISTS))
                     {
                         throw new WebBeansConfigurationException("Dependent Bean : " + bean + " can not define observer method with @Receiver = IF_EXIST");
                     }
                }
View Full Code Here

        //check for null
        if(observableMethods != null)
        {
            for (Method observableMethod : observableMethods)
            {
                Observes observes = AnnotationUtil.getMethodFirstParameterAnnotation(observableMethod, Observes.class);

                boolean ifExist = false;

                if (observes.notifyObserver().equals(Reception.IF_EXISTS))
                {
                    ifExist = true;
                }

                ObserverMethodImpl<T> observer = new ObserverMethodImpl(component, observableMethod, ifExist);
View Full Code Here

TOP

Related Classes of javax.enterprise.event.Observes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.