Package org.apache.webbeans.spi

Examples of org.apache.webbeans.spi.ScannerService


        initOwb(initialConfig);
    }

    public synchronized void initOwb(final Properties initialConfig)
    {
        ScannerService dummyScannerService = new OwbArquillianScannerService();

        Map<Class<?>, Object> initialServices = new HashMap<Class<?>, Object>();
        initialServices.put(ScannerService.class,  dummyScannerService);

        // this is needed because of a dirty hack in the OpenWebBeansConfiguration
View Full Code Here


        if (injectionPointBeanClass == null)
        {
            return null;
        }

        ScannerService scannerService = webBeansContext.getScannerService();
        BDABeansXmlScanner beansXMLScanner = scannerService.getBDABeansXmlScanner();
        return beansXMLScanner.getBeansXml(injectionPointBeanClass);
    }
View Full Code Here

     * @param qualifiers         qualifiers of the injection point
     * @return set of resolved beans
     */
    public Set<Bean<?>> implResolveByType(Type injectionPointType, Class<?> injectinPointClass, Annotation... qualifiers)
    {
        ScannerService scannerService = webBeansContext.getScannerService();
        String bdaBeansXMLFilePath = null;
        if (scannerService.isBDABeansXmlScanningEnabled())
        {
            if (injectinPointClass == null)
            {
                // Retrieve ip from thread local for producer case
                InjectionPoint ip = injectionPoints.get();
View Full Code Here


    private boolean isAltBeanInInjectionPointBDA(String bdaBeansXMLFilePath, Bean<?> altBean)
    {

        ScannerService scannerService = webBeansContext.getScannerService();
        BDABeansXmlScanner beansXMLScanner = scannerService.getBDABeansXmlScanner();

        Set<Class<?>> definedAlternatives = beansXMLScanner.getAlternatives(bdaBeansXMLFilePath);

        if (definedAlternatives.contains(altBean.getBeanClass()))
        {
View Full Code Here

       
        //Find the injection point Bean
        Bean<Object> injectedBean = (Bean<Object>)injectionResolver.getInjectionPointBean(injectionPoint);
       
        boolean isSetIPForProducers=false;
        ScannerService scannerService = webBeansContext.getScannerService();
        if ((scannerService != null && scannerService.isBDABeansXmlScanningEnabled()))
        {
            if (injectedBean instanceof AbstractOwbBean<?>)
            {
                AbstractOwbBean<?> aob = (AbstractOwbBean) injectedBean;
                if (aob.getWebBeansType() == WebBeansType.PRODUCERFIELD || aob.getWebBeansType() == WebBeansType.PRODUCERMETHOD)
View Full Code Here

    }

    private void filterInterceptorsPerBDA(AbstractInjectionTargetBean<?> component, List<InterceptorData> stack)
    {

        ScannerService scannerService = component.getWebBeansContext().getScannerService();
        if (!scannerService.isBDABeansXmlScanningEnabled())
        {
            return;
        }
        BDABeansXmlScanner beansXMLScanner = scannerService.getBDABeansXmlScanner();
        String beanBDABeansXML = beansXMLScanner.getBeansXml(component.getBeanClass());
        Set<Class<?>> definedInterceptors = beansXMLScanner.getInterceptors(beanBDABeansXML);

        InterceptorData interceptorData;
View Full Code Here

    }
   
    private static void filterDecoratorsPerBDA(AbstractInjectionTargetBean<?> component, List<Decorator<?>> stack)
    {

        ScannerService scannerService = component.getWebBeansContext().getScannerService();
        if (!scannerService.isBDABeansXmlScanningEnabled())
        {
            return;
        }
        BDABeansXmlScanner beansXMLScanner = scannerService.getBDABeansXmlScanner();
        String beanBDABeansXML = beansXMLScanner.getBeansXml(component.getBeanClass());
        Set<Class<?>> definedDecorators = beansXMLScanner.getDecorators(beanBDABeansXML);

        WebBeansDecorator<?> dec;
View Full Code Here

        classes.add(ScannerTestBean.class);
       
        //Start test container
        startContainer(classes);
       
        ScannerService scanner = getLifecycle().getScannerService();
        Set<Class<?>> classMap = scanner.getBeanClasses();
        Assert.assertNotNull(classMap);
        Assert.assertFalse(classMap.isEmpty());
       
        //Stop test container
        shutDownContainer();
View Full Code Here

        classes.add(ScannerTestBean.class);
       
        //Start test container
        startContainer(classes);
       
        ScannerService scanner = getLifecycle().getDiscoveryService();
        Set<Class<?>> classMap = scanner.getBeanClasses();
        Assert.assertNotNull(classMap);
        Assert.assertFalse(classMap.isEmpty());
       
        //Stop test container
        shutDownContainer();
View Full Code Here

       
        //Find the injection point Bean
        Bean<Object> injectedBean = (Bean<Object>)injectionResolver.getInjectionPointBean(injectionPoint);
       
        boolean isSetIPForProducers=false;
        ScannerService scannerService = webBeansContext.getScannerService();
        if ((scannerService != null && scannerService.isBDABeansXmlScanningEnabled()))
        {
            if (injectedBean instanceof AbstractOwbBean<?>)
            {
                AbstractOwbBean<?> aob = (AbstractOwbBean) injectedBean;
                if (aob.getWebBeansType() == WebBeansType.PRODUCERFIELD || aob.getWebBeansType() == WebBeansType.PRODUCERMETHOD)
View Full Code Here

TOP

Related Classes of org.apache.webbeans.spi.ScannerService

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.