Examples of newAnnotatedMethod()


Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

                    else
                    {
                        //Should only be a single method that matches the names & params
                        AnnotatedElementFactory annotatedElementFactory = bean.getWebBeansContext().getAnnotatedElementFactory();
                        AnnotatedType<T> declaringType = (AnnotatedType<T>) annotatedElementFactory.newAnnotatedType(classMethod.getDeclaringClass());
                        obs.setObserverMethod(annotatedElementFactory.newAnnotatedMethod(classMethod, declaringType));
                        found = true;
                        break;
                    }
                }
               
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

        manager.putInjectionTargetWrapper(ejbBean, new InjectionTargetWrapper(processInjectionTargetEvent.getInjectionTarget()));
       
        Map<ProducerMethodBean<?>,AnnotatedMethod<?>> annotatedMethods = new HashMap<ProducerMethodBean<?>, AnnotatedMethod<?>>();
        for(ProducerMethodBean<?> producerMethod : producerMethodBeans)
        {
            AnnotatedMethod<?> method = annotatedElementFactory.newAnnotatedMethod(producerMethod.getCreatorMethod(), annotatedType);
            ProcessProducerImpl<?, ?> producerEvent =
                webBeansContext.getWebBeansUtil().fireProcessProducerEventForMethod(producerMethod,
                                                                                                   method);
            webBeansContext.getWebBeansUtil().inspectErrorStack(
                "There are errors that are added by ProcessProducer event observers for ProducerMethods. Look at logs for further details");
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

       
        Map<ObserverMethod<?>,AnnotatedMethod<?>> observerMethodsMap = new HashMap<ObserverMethod<?>, AnnotatedMethod<?>>();
        for(ObserverMethod<?> observerMethod : observerMethods)
        {
            ObserverMethodImpl<?> impl = (ObserverMethodImpl<?>)observerMethod;
            AnnotatedMethod<?> method = annotatedElementFactory.newAnnotatedMethod(impl.getObserverMethod(), annotatedType);
           
            observerMethodsMap.put(observerMethod, method);
        }       

        //Fires ProcessManagedBean
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

        // PRODUCER METHODS
        Map<ProducerMethodBean<?>, AnnotatedMethod<?>> annotatedMethods = new HashMap<ProducerMethodBean<?>, AnnotatedMethod<?>>();
        for(ProducerMethodBean<?> producerMethod : producerMethodBeans)
        {
            AnnotatedMethod<?> method = annotatedElementFactory.newAnnotatedMethod(producerMethod.getCreatorMethod(), annotatedType);

            ProcessProducerImpl<?, ?> producerEvent = webBeansContext.getWebBeansUtil().fireProcessProducerEventForMethod(producerMethod, method);

            webBeansContext.getWebBeansUtil().inspectErrorStack(String.format(message, "ProcessProducer", "ProducerMethods"));
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

                    //Get parameter annotations
                    Annotation[] bindingTypes = annotationManager.getQualifierAnnotations(annot);

                    //Define annotated parameter
                    AnnotatedType<T> annotatedType = (AnnotatedType<T>) annotatedElementFactory.newAnnotatedType(bean.getReturnType());
                    AnnotatedMethod<T> newAnnotatedMethod = annotatedElementFactory.newAnnotatedMethod(observerMethod, annotatedType);

                    //Annotated parameter
                    AnnotatedParameter<T> annotatedParameter = newAnnotatedMethod.getParameters().get(i);
                   
                    //Creating injection point
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

        List<InjectionPoint> lists = new ArrayList<InjectionPoint>();

        AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
        AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
        AnnotatedMethod method = annotatedElementFactory.newAnnotatedMethod(member, annotated);
        List<AnnotatedParameter<?>> parameters = method.getParameters();

        InjectionPoint point = null;

        for(AnnotatedParameter<?> parameter : parameters)
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

           
            Method method = webBeansContext.getSecurityService().doPrivilegedGetDeclaredMethod(beanClass, methodName, parameters);
            injectionMember = method;
           
            AnnotatedType<?> annotatedType = annotatedElementFactory.newAnnotatedType(beanClass);
            AnnotatedMethod<Object> am =  (AnnotatedMethod<Object>)annotatedElementFactory.
                                    newAnnotatedMethod((Method) injectionMember,annotatedType);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();

            annotated = annParameters.get(in.readByte());
            injectionType = annotated.getBaseType();
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

    {
        AnnotatedElementFactory annotatedElementFactory = AnnotatedElementFactory.getInstance();

        //Define annotated parameter
        AnnotatedType<T> annotatedType = (AnnotatedType<T>) annotatedElementFactory.newAnnotatedType(this.bean.getReturnType());
        AnnotatedMethod<T> annotatedMethod = (AnnotatedMethod<T>)annotatedElementFactory.newAnnotatedMethod(this.observerMethod, annotatedType);
       
        Type[] types = this.observerMethod.getGenericParameterTypes();
        Annotation[][] annots = this.observerMethod.getParameterAnnotations();
        List<ObserverParams> list = new ArrayList<ObserverParams>();
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

           
            Method method = ClassUtil.getDeclaredMethod(beanClass, methodName, parameters);
            this.injectionMember = method;
           
            AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(beanClass);
            AnnotatedMethod<Object> am =  (AnnotatedMethod<Object>)annotatedElementFactory.
                                    newAnnotatedMethod((Method)this.injectionMember ,annotated);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();
           
            this.annotated = annParameters.get(in.readByte());           
            this.injectionType = this.annotated.getBaseType();
View Full Code Here

Examples of org.apache.webbeans.portable.AnnotatedElementFactory.newAnnotatedMethod()

        manager.putInjectionTargetWrapper(ejbBean, new InjectionTargetWrapper(processInjectionTargetEvent.getInjectionTarget()));
       
        Map<ProducerMethodBean<?>,AnnotatedMethod<?>> annotatedMethods = new HashMap<ProducerMethodBean<?>, AnnotatedMethod<?>>();
        for(ProducerMethodBean<?> producerMethod : producerMethodBeans)
        {
            AnnotatedMethod<?> method = annotatedElementFactory.newAnnotatedMethod(producerMethod.getCreatorMethod(), annotatedType);
            ProcessProducerImpl<?, ?> producerEvent = WebBeansUtil.fireProcessProducerEventForMethod(producerMethod,method);
            WebBeansUtil.inspectErrorStack("There are errors that are added by ProcessProducer event observers for ProducerMethods. Look at logs for further details");

            annotatedMethods.put(producerMethod, method);
            manager.putInjectionTargetWrapper(producerMethod, new InjectionTargetWrapper(producerEvent.getProducer()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.