Examples of BeanDefinitionHolder


Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

    Element referenceElement = elementBuilder.toXml();
    referenceElement.appendChild(beanElement);

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition,
        beanName);

    delegate.parseBeanDefinitionElement(beanElement, null);
    helperControl.setReturnValue(holder);
    helperControl.replay();
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

    Element referenceElement = elementBuilder.toXml();
    referenceElement.appendChild(beanElement);

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition,
        beanName);

    delegate.parseBeanDefinitionElement(beanElement, null);
    helperControl.setReturnValue(holder);
    helperControl.replay();
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

    Element referenceElement = elementBuilder.toXml();
    referenceElement.appendChild(beanElement);

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition,
        beanName);

    delegate.parseBeanDefinitionElement(beanElement, null);
    helperControl.setReturnValue(holder);
    helperControl.replay();
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

  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;
    }
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

  }

  private void configureInnerAnalyzer(Element element, RootBeanDefinition definition, ParserContext parserContext, MutablePropertyValues propertyValues) {
    Element analyzerElement = DomUtils.getChildElementByTagName(element, ANALYZER_ELEMENT);
    if( analyzerElement!=null ) {
      BeanDefinitionHolder analyzer = handlerAnalyzerDefinition(analyzerElement, definition, parserContext);
      if( analyzer!=null ) {
        propertyValues.addPropertyValue(ANALYZER_ATTRIBUTE, analyzer);
      }
    }
  }
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

      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

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

                    throw new IllegalStateException("<ref> elements must have a \"bean\" attribute!");
                }
                bean.addPropertyReference(propertyName, id);
                return;
            } else if ("bean".equals(name)) {
                BeanDefinitionHolder bdh = ctx.getDelegate().parseBeanDefinitionElement(first);
                child = bdh.getBeanDefinition();
                bean.addPropertyValue(propertyName, child);
                return;
            } else {
                throw new UnsupportedOperationException("Elements with the name " + name 
                                                        + " are not currently "
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

                        } else if (id instanceof BeanReference) {
                            BeanReference br = (BeanReference)id;
                            Object refId = context.getBean(br.getBeanName());
                            checked.add(refId);
                        } else if (id instanceof BeanDefinitionHolder) {
                            BeanDefinitionHolder bdh = (BeanDefinitionHolder)id;
                            if (QName.class.getName().equals(bdh.getBeanDefinition().getBeanClassName())) {
                                try {
                                    java.util.List l = bdh.getBeanDefinition().getConstructorArgumentValues()
                                        .getGenericArgumentValues();
                                   
                                    ConstructorArgumentValues.ValueHolder v
                                        = (ConstructorArgumentValues.ValueHolder)l.get(0);
                                   
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

  private final String scope;

  private final boolean scoped;

  public static BeanDefinitionHolder createScopedProxy(String beanName, BeanDefinition definition, BeanDefinitionRegistry registry, boolean proxyTargetClass) {
    BeanDefinitionHolder proxyHolder = ScopedProxyUtils.createScopedProxy(new BeanDefinitionHolder(definition, beanName), registry, proxyTargetClass);
    registry.registerBeanDefinition(beanName, proxyHolder.getBeanDefinition());
    return proxyHolder;
  }
View Full Code Here

Examples of org.springframework.beans.factory.config.BeanDefinitionHolder

    String beanName = null;
    if (value instanceof BeanDefinition) {
      definition = (BeanDefinition) value;
      beanName = BeanDefinitionReaderUtils.generateBeanName(definition, registry);
    } else if (value instanceof BeanDefinitionHolder) {
      BeanDefinitionHolder holder = (BeanDefinitionHolder) value;
      definition = holder.getBeanDefinition();
      beanName = holder.getBeanName();
    }

    if (definition != null) {
      boolean nestedScoped = scope.equals(definition.getScope());
      boolean scopeChangeRequiresProxy = !scoped && nestedScoped;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.