Package org.springframework.beans.factory.xml

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


    // parses out the inner bean definition for concrete implementation if defined
    List<Element> childElements = DomUtils.getChildElementsByTagName(element, "bean");
    BeanComponentDefinition innerComponentDefinition = null;
    if (childElements != null && childElements.size() == 1) {
      Element beanElement = childElements.get(0);
      BeanDefinitionParserDelegate delegate = parserContext.getDelegate();
      BeanDefinitionHolder bdHolder = delegate.parseBeanDefinitionElement(beanElement);
      bdHolder = delegate.decorateBeanDefinitionIfRequired(beanElement, bdHolder);
      BeanDefinition inDef = bdHolder.getBeanDefinition();
      innerComponentDefinition = new BeanComponentDefinition(inDef, bdHolder.getBeanName());
    }
    String ref = element.getAttribute(REF_ATTRIBUTE);
    if (StringUtils.hasText(ref) && innerComponentDefinition != null) {
View Full Code Here


  private BeanDefinitionHolder handlerAnalyzerDefinition(Element element, RootBeanDefinition definition, ParserContext parserContext) {
    Element beanElement = DomUtils.getChildElementByTagName(element, BEAN_ELEMENT);
    if( beanElement!=null ) {
      //Compute the inner bean of the analyzer
      BeanDefinitionParserDelegate delegate = parserContext.getDelegate();
      BeanDefinitionHolder holder = delegate.parseBeanDefinitionElement(beanElement, definition);
      if( holder!=null ) {
        holder = delegate.decorateBeanDefinitionIfRequired(beanElement, holder);
      }
      return holder;
    }

    return null;
View Full Code Here

    if (childElements != null && childElements.size() == 1) {
      Element beanElement = childElements.get(0);
            if (!"http://www.springframework.org/schema/beans".equals(beanElement.getNamespaceURI())) {
                throw new IllegalStateException ("Illegal inner child element");
            }
      BeanDefinitionParserDelegate delegate = parserContext.getDelegate();
      BeanDefinitionHolder beanDefinitionHolder = delegate.parseBeanDefinitionElement(beanElement);
      beanDefinitionHolder = delegate.decorateBeanDefinitionIfRequired(beanElement, beanDefinitionHolder);
      BeanDefinition beanDefinition = beanDefinitionHolder.getBeanDefinition();
      innerComponentDefinition = new BeanComponentDefinition(beanDefinition, beanDefinitionHolder.getBeanName());
    }
    return innerComponentDefinition;
  }
View Full Code Here

public class MunitBeanDefinitionDocumentReader extends MuleBeanDefinitionDocumentReader
{
    @Override
    protected BeanDefinitionParserDelegate createHelper(XmlReaderContext readerContext, Element root, BeanDefinitionParserDelegate parentDelegate)
    {
        BeanDefinitionParserDelegate delegate = new MunitBeanDefinitionParserDelegate(readerContext, this);
        delegate.initDefaults(root, parentDelegate);
        return delegate;
    }
View Full Code Here

public class MuleBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocumentReader
{

    protected BeanDefinitionParserDelegate createHelper(XmlReaderContext readerContext, Element root)
    {
        BeanDefinitionParserDelegate delegate = new MuleHierarchicalBeanDefinitionParserDelegate(readerContext, this);
        delegate.initDefaults(root);
        return delegate;
    }
View Full Code Here

public class JaxbBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocumentReader {

    @Override
    protected BeanDefinitionParserDelegate createHelper(XmlReaderContext readerContext, Element root) {
        BeanDefinitionParserDelegate delegate = new JaxbBeanDefinitionParserDelegate(readerContext);
        delegate.initDefaults(root);
        return delegate;
    }
View Full Code Here

        }

        private BeanDefinitionParserDelegate createBeanDefinitionParserDelegate(final Element element) {
            assert element != null;

            BeanDefinitionParserDelegate parser = new BeanDefinitionParserDelegate(context.getReaderContext());
            parser.initDefaults(element.getOwnerDocument().getDocumentElement());
            return parser;
        }
View Full Code Here

        }

        private BeanDefinitionHolder parseBeanDefinitionElement(final Element element) {
            assert element != null;

            BeanDefinitionParserDelegate parser = createBeanDefinitionParserDelegate(element);
            return parser.parseBeanDefinitionElement(element);
        }
View Full Code Here

                    BeanDefinitionHolder holder = parseBeanDefinitionElement(child);
                    // noinspection unchecked
                    completers.add(holder.getBeanDefinition());
                }
                else if (DomUtils.nodeNameEquals(child, REF)) {
                    BeanDefinitionParserDelegate parser = createBeanDefinitionParserDelegate(child);
                    RuntimeBeanReference ref = (RuntimeBeanReference) parser.parsePropertySubElement(child, completer.getRawBeanDefinition());
                    // noinspection unchecked
                    completers.add(ref);
                }
                else if (DomUtils.nodeNameEquals(child, NULL)) {
                    // noinspection unchecked
View Full Code Here

{

    @Override
    protected BeanDefinitionParserDelegate createHelper(XmlReaderContext readerContext, Element root, BeanDefinitionParserDelegate parentDelegate)
    {
        BeanDefinitionParserDelegate delegate = new MuleHierarchicalBeanDefinitionParserDelegate(readerContext, this);
        delegate.initDefaults(root, parentDelegate);
        return delegate;
    }
View Full Code Here

TOP

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

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.