Package org.springframework.beans.factory.xml

Examples of org.springframework.beans.factory.xml.AbstractBeanDefinitionParser


    }

    @Override
    protected final AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder proxyBuilder = BeanDefinitionBuilder.genericBeanDefinition(ProxyFactoryBean.class);
        AbstractBeanDefinitionParser realParser = getRealObjectParser();

        // 取得真实的bean,注意,由于设置了containingBean=proxyBean,这个bean不会被注册到registry
        ParserContext realBeanParserContext = new ParserContext(parserContext.getReaderContext(),
                                                                parserContext.getDelegate(), proxyBuilder.getRawBeanDefinition());

        AbstractBeanDefinition realBd = (AbstractBeanDefinition) realParser.parse(element, realBeanParserContext);

        // 检查scope,对于singleton和prototype,不创建proxy,直接返回真实的bean,否则创建proxy bean
        String scope = trimToNull(getScope(element, realBd));

        if (scope == null || scope.equalsIgnoreCase(SCOPE_SINGLETON) || scope.equalsIgnoreCase(SCOPE_PROTOTYPE)) {
View Full Code Here


    }

    @Override
    protected final AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder proxyBuilder = BeanDefinitionBuilder.genericBeanDefinition(ProxyFactoryBean.class);
        AbstractBeanDefinitionParser realParser = getRealObjectParser();

        // 取得真实的bean,注意,由于设置了containingBean=proxyBean,这个bean不会被注册到registry
        ParserContext realBeanParserContext = new ParserContext(parserContext.getReaderContext(),
                                                                parserContext.getDelegate(), proxyBuilder.getRawBeanDefinition());

        AbstractBeanDefinition realBd = (AbstractBeanDefinition) realParser.parse(element, realBeanParserContext);

        // 检查scope,对于singleton和prototype,不创建proxy,直接返回真实的bean,否则创建proxy bean
        String scope = trimToNull(getScope(element, realBd));

        if (scope == null || scope.equalsIgnoreCase(SCOPE_SINGLETON) || scope.equalsIgnoreCase(SCOPE_PROTOTYPE)) {
View Full Code Here

    }

    @Override
    protected final AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder proxyBuilder = BeanDefinitionBuilder.genericBeanDefinition(ProxyFactoryBean.class);
        AbstractBeanDefinitionParser realParser = getRealObjectParser();

        // ȡ����ʵ��bean��ע�⣬����������containingBean=proxyBean�����bean���ᱻע�ᵽregistry
        ParserContext realBeanParserContext = new ParserContext(parserContext.getReaderContext(),
                parserContext.getDelegate(), proxyBuilder.getRawBeanDefinition());

        AbstractBeanDefinition realBd = (AbstractBeanDefinition) realParser.parse(element, realBeanParserContext);

        // ���scope������singleton��prototype��������proxy��ֱ�ӷ�����ʵ��bean�����򴴽�proxy bean
        String scope = trimToNull(getScope(element, realBd));

        if (scope == null || scope.equalsIgnoreCase(SCOPE_SINGLETON) || scope.equalsIgnoreCase(SCOPE_PROTOTYPE)) {
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

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.