Package javax.enterprise.inject

Examples of javax.enterprise.inject.Typed


     * @param clazz bean implementation class
     */
    public static <T> void defineApiTypes(AbstractOwbBean<T> bean, Class<T> clazz)
    {
        //Looking for bean types
        Typed beanTypes = clazz.getAnnotation(Typed.class);
        if(beanTypes != null)
        {
            defineUserDefinedBeanTypes(bean, null, beanTypes);           
        }
        else
View Full Code Here


     */
    public static <T> void defineProducerMethodApiTypes(AbstractProducerBean<T> producerBean, Type type, Annotation[] annots)
    {
       
        //Looking for bean types
        Typed beanTypes = AnnotationUtil.getAnnotation(annots, Typed.class);
        if(beanTypes != null)
        {
            defineUserDefinedBeanTypes(producerBean, type, beanTypes);
        }
        else
View Full Code Here

        Annotation[] annots = clazz.getDeclaredAnnotations();
       
        //Looking for bean types
        if(AnnotationUtil.hasAnnotation(annots, Typed.class))
        {
            Typed beanTypes = (Typed) AnnotationUtil.getAnnotation(annots, Typed.class);
            defineUserDefinedBeanTypes(bean, null, beanTypes);           
        }
        else
        {
            defineNormalApiTypes(bean, clazz);
View Full Code Here

    {
       
        //Looking for bean types
        if(AnnotationUtil.hasAnnotation(annots, Typed.class))
        {
            Typed beanTypes = (Typed) AnnotationUtil.getAnnotation(annots, Typed.class);
            defineUserDefinedBeanTypes(producerBean, type, beanTypes);
        }
       
        else
        {
View Full Code Here

            ejbTypes.add(Object.class);
        }

        private static void addApiTypes(final Collection<Type> clazzes, final Class<?> beanClass) {
            final Typed typed = beanClass.getAnnotation(Typed.class);
            if (typed == null || typed.value().length == 0) {
                Class<?> current = beanClass;
                while (current != null && !Object.class.equals(current)) {
                    clazzes.add(current);
                    current = current.getSuperclass();
                }
            } else {
                Collections.addAll(clazzes, typed.value());
            }
        }
View Full Code Here

            ClassUtil.setTypeHierarchy(this.typeClosures, this.baseType);

            Annotation[] anns = annotations.toArray(new Annotation[annotations.size()]);
            if(AnnotationUtil.hasAnnotation(anns, Typed.class))
            {
                Typed beanTypes = AnnotationUtil.getAnnotation(anns, Typed.class);
                Class<?>[] types = beanTypes.value();

                //New api types
                Set<Type> newTypes = new HashSet<Type>();
                for(Class<?> type : types)
                {
View Full Code Here

        Annotation[] annots = clazz.getDeclaredAnnotations();
       
        //Looking for bean types
        if(AnnotationUtil.hasAnnotation(annots, Typed.class))
        {
            Typed beanTypes = AnnotationUtil.getAnnotation(annots, Typed.class);
            defineUserDefinedBeanTypes(bean, null, beanTypes);           
        }
        else
        {
            defineNormalApiTypes(bean, clazz);
View Full Code Here

    {
       
        //Looking for bean types
        if(AnnotationUtil.hasAnnotation(annots, Typed.class))
        {
            Typed beanTypes = AnnotationUtil.getAnnotation(annots, Typed.class);
            defineUserDefinedBeanTypes(producerBean, type, beanTypes);
        }
       
        else
        {
View Full Code Here

            ejbTypes.add(Object.class);
        }

        private static void addApiTypes(final Collection<Type> clazzes, final Class<?> beanClass) {
            final Typed typed = beanClass.getAnnotation(Typed.class);
            if (typed == null || typed.value().length == 0) {
                Class<?> current = beanClass;
                while (current != null && !Object.class.equals(current)) {
                    clazzes.add(current);
                    current = current.getSuperclass();
                }
            } else {
                Collections.addAll(clazzes, typed.value());
            }
        }
View Full Code Here

     * @param clazz bean implementation class
     */
    public static <T> void defineApiTypes(AbstractOwbBean<T> bean, Class<T> clazz)
    {
        //Looking for bean types
        Typed beanTypes = clazz.getAnnotation(Typed.class);
        if(beanTypes != null)
        {
            defineUserDefinedBeanTypes(bean, null, beanTypes);           
        }
        else
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.Typed

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.