Examples of newAnnotatedType()


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

        WebBeansContext webBeansContext = bean.getWebBeansContext();
        AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
        AnnotationManager annotationManager = webBeansContext.getAnnotationManager();

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

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

    {
        WebBeansContext webBeansContext = ejbBean.getWebBeansContext();
        BeanManagerImpl manager = webBeansContext.getBeanManagerImpl();
        AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();

        AnnotatedType<T> annotatedType = annotatedElementFactory.newAnnotatedType(clazz);
       
        //Fires ProcessAnnotatedType
        ProcessAnnotatedTypeImpl<T> processAnnotatedEvent = (ProcessAnnotatedTypeImpl<T>)event;            
        EjbBeanCreatorImpl<T> ejbBeanCreator = new EjbBeanCreatorImpl<T>(ejbBean);
        ejbBeanCreator.checkCreateConditions();
View Full Code Here

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

        final WebBeansContext webBeansContext = ejbBean.getWebBeansContext();
        final BeanManagerImpl manager = webBeansContext.getBeanManagerImpl();

        final AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();

        final AnnotatedType<T> annotatedType = annotatedElementFactory.newAnnotatedType(clazz);

        final DefinitionUtil util = webBeansContext.getDefinitionUtil();

        final Set<ProducerMethodBean<?>> producerMethodBeans = util.defineProducerMethods(ejbBean, clazz);
View Full Code Here

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

        if(!checkFieldApplicable(annots))
        {
            AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();

            AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
            return getGenericInjectionPoint(owner, annots, member.getGenericType(), member, annotatedElementFactory.newAnnotatedField(member, annotated));
        }
        else
        {
            return null;
View Full Code Here

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

        Asserts.assertNotNull(member, "member parameter can not be null");

        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;
View Full Code Here

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

            String fieldName = in.readUTF();
            Field field = ClassUtil.getFieldWithName(beanClass, fieldName);
           
            this.injectionMember = field;
           
            AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(beanClass);
            this.annotated = annotatedElementFactory.newAnnotatedField(field, annotated);
            this.injectionType = field.getGenericType();
           
        }
        else if(c == 1)
View Full Code Here

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

            Class<?>[] parameters = (Class<?>[])in.readObject();
           
            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());           
View Full Code Here

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

        else if(c == 2)
        {
            Class<?>[] parameters = (Class<?>[])in.readObject();           
            this.injectionMember = ClassUtil.getConstructor(beanClass, parameters);

            AnnotatedType<Object> annotated = (AnnotatedType<Object>)annotatedElementFactory.newAnnotatedType(beanClass);
            AnnotatedConstructor<Object> am =  (AnnotatedConstructor<Object>)annotatedElementFactory
                                            .newAnnotatedConstructor((Constructor<Object>)this.injectionMember,annotated);
            List<AnnotatedParameter<Object>> annParameters = am.getParameters();
           
            this.annotated = annParameters.get(in.readByte());           
View Full Code Here

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

            String fieldName = in.readUTF();
            Field field = webBeansContext.getSecurityService().doPrivilegedGetDeclaredField(beanClass, fieldName);

            injectionMember = field;
           
            AnnotatedType<?> annotatedType = annotatedElementFactory.newAnnotatedType(beanClass);
            annotated = annotatedElementFactory.newAnnotatedField(field, annotatedType);
            injectionType = field.getGenericType();
           
        }
        else if(c == 1)
View Full Code Here

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

            Class<?>[] parameters = (Class<?>[])in.readObject();
           
            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());
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.