Examples of newAnnotatedType()


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

    protected List<ObserverParams> getMethodArguments(Object event)
    {
        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.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()

    public static <T> void fireEvents(Class<T> clazz, BaseEjbBean<T> ejbBean,ProcessAnnotatedType<T> event)
    {
        BeanManagerImpl manager = BeanManagerImpl.getManager();
        AnnotatedElementFactory annotatedElementFactory = AnnotatedElementFactory.getInstance();

        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()

    {
        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()

        } else {
            clazz = method.getDeclaringClass();
        }

        final AnnotatedElementFactory factory = beanManager.getWebBeansContext().getAnnotatedElementFactory();
        final AnnotatedMethod<?> am = factory.newAnnotatedMethod(method, factory.newAnnotatedType(clazz));

        final Class<?>[] parameterTypes = method.getParameterTypes();
        for (int i = 0; i < parameterTypes.length; i++) {
            try {
                values[i] = getParamInstance(beanManager, i, am);
View Full Code Here

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

                                                                             .getAdditionalAnnotatedTypes();

            for(Class<?> implClass : classIndex)
            {
                //Define annotation type
                AnnotatedType<?> annotatedType = annotatedElementFactory.newAnnotatedType(implClass);
               
                if (null != annotatedType)
                {
                    deploySingleAnnotatedType(implClass, annotatedType);
View Full Code Here

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

                    }
                    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.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
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.