Package org.apache.webbeans.container

Examples of org.apache.webbeans.container.InjectionResolver


           
            //Clear extensions
            webBeansContext.getExtensionLoader().clear();
           
            //Delete Resolutions Cache
            InjectionResolver injectionResolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();

            injectionResolver.clearCaches();
           
            //Delte proxies
            webBeansContext.getJavassistProxyFactory().clear();
           
            //Delete AnnotateTypeCache
View Full Code Here


    {
        Object injected;
        BeanManagerImpl beanManager = injectionOwnerBean.getWebBeansContext().getBeanManagerImpl();

        //Injected contextual beam
        InjectionResolver instance = beanManager.getInjectionResolver();

        Bean<?> injectedBean = instance.getInjectionPointBean(injectionPoint);
        if(isInstanceProviderInjection(injectionPoint))
        {
            InstanceBean.local.set(injectionPoint);
        }
       
View Full Code Here

    private Set<Bean<?>> resolveBeans()
    {
        Annotation[] anns = new Annotation[qualifierAnnotations.size()];
        anns = qualifierAnnotations.toArray(anns);

        InjectionResolver injectionResolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();

        InjectionResolver resolver = injectionResolver;
        Set<Bean<?>> beans = resolver.implResolveByType(
                injectionClazz, injectionPointClazz, anns);
        return beans;
    }
View Full Code Here

                        part = beanName.substring(0,i);               
                    }
                   
                    if(beanName.equals(other))
                    {
                        InjectionResolver resolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();
                        Set<Bean<?>> beans = resolver.implResolveByName(beanName);
                        if(beans.size() > 1)
                        {
                            beans = resolver.findByAlternatives(beans);                           
                            if(beans.size() > 1)
                            {
                                InjectionExceptionUtils.throwAmbiguousResolutionExceptionForBeanName(beans, beanName);
                            }  
                        }
View Full Code Here

            {
                checkProducerMethodDisposal(annotatedMethod);
                Type type = AnnotationUtil.getAnnotatedMethodFirstParameterWithAnnotation(annotatedMethod, Disposes.class);
                Annotation[] annot = annotationManager.getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(annotatedMethod, Disposes.class);

                InjectionResolver injectionResolver = bean.getWebBeansContext().getBeanManagerImpl().getInjectionResolver();

                Set<Bean<?>> set = injectionResolver.implResolveByType(type, annot);
                if (set.isEmpty())
                {
                    throwUnsatisfiedResolutionException(type, declaredMethod, annot);
                }
               
View Full Code Here

                        part = beanName.substring(0,i);               
                    }
                   
                    if(beanName.equals(other))
                    {
                        InjectionResolver resolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();
                        Set<Bean<?>> beans = resolver.implResolveByName(beanName);
                        if(beans.size() > 1)
                        {
                            beans = resolver.findByAlternatives(beans);                           
                            if(beans.size() > 1)
                            {
                                InjectionExceptionUtils.throwAmbiguousResolutionExceptionForBeanName(beans, beanName);
                            }  
                        }
View Full Code Here

            WebBeansUtil.checkProducerMethodDisposal(declaredMethod, clazz.getName());

            Type type = AnnotationUtil.getMethodFirstParameterWithAnnotation(declaredMethod, Disposes.class);
            Annotation[] annot = annotationManager.getMethodFirstParameterQualifierWithGivenAnnotation(declaredMethod, Disposes.class);

            InjectionResolver instance = webBeansContext.getBeanManagerImpl().getInjectionResolver();

            Set<Bean<?>> set = instance.implResolveByType(type, annot);
            if (set.isEmpty())
            {
                throwUnsatisfiedResolutionException(clazz, declaredMethod, annot);
            }
           
View Full Code Here

           
            //Clear extensions
            webBeansContext.getExtensionLoader().clear();
           
            //Delete Resolutions Cache
            InjectionResolver injectionResolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();

            injectionResolver.clearCaches();
           
            //Delte proxies
            webBeansContext.getJavassistProxyFactory().clear();
           
            //Delete AnnotateTypeCache
View Full Code Here

    {
        Object injected;
        BeanManagerImpl beanManager = injectionOwnerBean.getWebBeansContext().getBeanManagerImpl();

        //Injected contextual beam
        InjectionResolver instance = beanManager.getInjectionResolver();

        Bean<?> injectedBean = instance.getInjectionPointBean(injectionPoint);
        if(isInstanceProviderInjection(injectionPoint))
        {
            InstanceBean.local.set(injectionPoint);
        }
       
View Full Code Here

        return false;
    }

    public boolean isPassivationCapableDependency(InjectionPoint injectionPoint)
    {
        InjectionResolver instance = webBeansContext.getBeanManagerImpl().getInjectionResolver();

        Bean<?> bean = instance.getInjectionPointBean(injectionPoint);
        if((bean instanceof EnterpriseBeanMarker) ||
                (bean instanceof ResourceBean) ||
                (bean instanceof InstanceBean) ||
                (bean instanceof EventBean) ||
                (bean instanceof InjectionPointBean) ||
View Full Code Here

TOP

Related Classes of org.apache.webbeans.container.InjectionResolver

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.