Package org.apache.webbeans.container

Examples of org.apache.webbeans.container.InjectionResolver


                        part = beanName.substring(0,i);               
                    }
                   
                    if(beanName.equals(other))
                    {
                        InjectionResolver resolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();
                        Set<Bean<?>> beans = resolver.implResolveByName(beanName);
                        if(beans.size() > 1)
                        {
                            try
                            {
                                resolver.resolve(beans);
                            }
                            catch(AmbiguousResolutionException are)
                            {
                                // throw the Exception with even more information
                                InjectionExceptionUtil.throwAmbiguousResolutionExceptionForBeanName(beans, beanName);
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)
                        {
                            try
                            {
                                resolver.resolve(beans);
                            }
                            catch(AmbiguousResolutionException are)
                            {
                                // throw the Exception with even more information
                                InjectionExceptionUtil.throwAmbiguousResolutionExceptionForBeanName(beans, beanName);
View Full Code Here

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

            injectionResolver.clearCaches();
           
            //Delete AnnotateTypeCache
            webBeansContext.getAnnotatedElementFactory().clear();
           
            //After Stop
View Full Code Here

                            list.add(producerMethodInstance);
                        }
                        else
                        {
                            Object instance = inject(point);
                            InjectionResolver injectionResolver = getWebBeansContext().getBeanManagerImpl().getInjectionResolver();

                            Bean<?> injectedBean = injectionResolver.getInjectionPointBean(point);
                            if(injectedBean.getScope() == Dependent.class)
                            {
                                dependentParameters.put(injectedBean, instance);
                            }
View Full Code Here

    {
        T injected;
        BeanManagerImpl beanManager = creationalContext.getWebBeansContext().getBeanManagerImpl();

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

        Bean<?> injectedBean = instance.getInjectionPointBean(injectionPoint);
       
        //Injection for dependent instance InjectionPoint fields
        boolean dependentProducer = false;
        if(WebBeansUtil.isDependent(injectedBean))
        {
View Full Code Here

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

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

        Bean<?> injectionPointBean = injectionPoint.getBean();
        Class<?> injectionPointClass = null;
        if (injectionPointBean != null)
        {
            injectionPointClass = injectionPointBean.getBeanClass();
        }
        Set<Bean<?>> beans = injectionResolver.implResolveByType(false, injectionClazz, injectionPointClass, anns);
        return injectionResolver.resolveAll(beans);
    }
View Full Code Here

        //Don't attempt to get an instance of the delegate injection point
        if (injectionPoint.isDelegate())
        {
            return true;
        }
        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

                        part = beanName.substring(0,i);               
                    }
                   
                    if(beanName.equals(other))
                    {
                        InjectionResolver resolver = webBeansContext.getBeanManagerImpl().getInjectionResolver();
                        Set<Bean<?>> beans = resolver.implResolveByName(beanName);
                        if(beans.size() > 1)
                        {
                            try
                            {
                                resolver.resolve(beans);
                            }
                            catch(AmbiguousResolutionException are)
                            {
                                // throw the Exception with even more information
                                InjectionExceptionUtil.throwAmbiguousResolutionExceptionForBeanName(beans, beanName);
View Full Code Here

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

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

                    if (i != -1) {
                        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) {
                                throw new WebBeansConfigurationException("There are two different beans with name : " + beanName + " in the deployment archieve");
                            }
                        }
                    } else {
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.