Package javax.enterprise.inject.spi

Examples of javax.enterprise.inject.spi.AnnotatedType


    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(MoreThanOneAroundInvokeComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here


    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithoutParameterComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here

    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithoutReturnTypeComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here

    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithWrongReturnTypeComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here

    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithStaticMethodComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here

    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(AroundInvokeWithFinalMethodComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here

    {
        try
        {
            clear();
            AbstractInjectionTargetBean<?> component = defineManagedBean(NoArgConstructorInterceptorComponent.class);
            AnnotatedType annotatedType = getWebBeansContext().getAnnotatedElementFactory().getAnnotatedType(component.getReturnType());
            getWebBeansContext().getEJBInterceptorConfig().configure(annotatedType, component.getInterceptorStack());
        }
        catch (WebBeansConfigurationException e)
        {
            System.out.println("got expected exception: " + e.getMessage());
View Full Code Here

        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        webBeansContext.getManagedBeanConfigurator().checkManagedBeanCondition(clazz);

        webBeansContext.getInterceptorsManager().addNewInterceptor(clazz);
        AnnotatedType annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz);
        webBeansContext.getInterceptorUtil().checkInterceptorConditions(annotatedType);
        component = webBeansContext.getManagedBeanConfigurator().define(clazz, WebBeansType.INTERCEPTOR);
        webBeansContext.getWebBeansInterceptorConfig().configureInterceptorClass((ManagedBean<Object>) component,
                                                            webBeansContext.getAnnotationManager().getInterceptorBindingMetaAnnotations(
                                                                clazz.getDeclaredAnnotations()));
View Full Code Here

    }

    public <T> void defineInterceptor(ManagedBeanCreatorImpl<T> managedBeanCreator, ProcessInjectionTarget<T> injectionTargetEvent)
    {
        Class<?> clazz = injectionTargetEvent.getAnnotatedType().getJavaClass();
        AnnotatedType annotatedType = injectionTargetEvent.getAnnotatedType();

        if (webBeansContext.getInterceptorsManager().isInterceptorEnabled(clazz))
        {
            ManagedBean<T> component;

            webBeansContext.getInterceptorUtil().checkInterceptorConditions(annotatedType);
            component = defineManagedBean(managedBeanCreator, injectionTargetEvent, false);

            if (component != null)
            {
                Annotation[] anns = annotatedType.getAnnotations().toArray(new Annotation[annotatedType.getAnnotations().size()]);
                webBeansContext.getWebBeansInterceptorConfig().configureInterceptorClass(component,
                        webBeansContext.getAnnotationManager().getInterceptorBindingMetaAnnotations(anns));
            }
            else
            {
View Full Code Here

       
        boolean isAlternative = hasInjectionTargetBeanAnnotatedWithAlternative(bean);

        if(!isAlternative)
        {
            AnnotatedType at = bean.getAnnotatedType();
            if (at != null)
            {
                isAlternative =  at.getAnnotation(Alternative.class) != null;
            }
        }
       
        if(isAlternative && !webBeansContext.getAlternativesManager().isBeanHasAlternative(bean))
        {
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.spi.AnnotatedType

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.