Package org.springframework.beans.factory.config

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


      
        BeanDefinition factoryDefinition = factoryBuilder.getBeanDefinition();

        String factoryName = parserContext.getReaderContext().generateBeanName(factoryDefinition);
       
        BeanDefinitionHolder factoryHolder = new BeanDefinitionHolder(factoryDefinition, factoryName);
        registerBeanDefinition(factoryHolder, parserContext.getRegistry());

        // set the factory on the listener bean
        builder.getRawBeanDefinition().setFactoryBeanName(factoryName);
        builder.getRawBeanDefinition().setFactoryMethodName("createServer");
View Full Code Here


       
        BeanDefinition factoryDefinition = factoryBuilder.getBeanDefinition();

        String listenerFactoryName = parserContext.getReaderContext().generateBeanName(factoryDefinition);
       
        BeanDefinitionHolder factoryHolder = new BeanDefinitionHolder(factoryDefinition, listenerFactoryName);
        registerBeanDefinition(factoryHolder, parserContext.getRegistry());

        // set the factory on the listener bean
        builder.getRawBeanDefinition().setFactoryBeanName(listenerFactoryName);
        builder.getRawBeanDefinition().setFactoryMethodName("createListener");
View Full Code Here

        }
       
        BeanDefinition factoryDefinition = factoryBuilder.getBeanDefinition();
        String factoryId = parserContext.getReaderContext().generateBeanName(factoryDefinition);
       
        BeanDefinitionHolder factoryHolder = new BeanDefinitionHolder(factoryDefinition, factoryId);
        registerBeanDefinition(factoryHolder, parserContext.getRegistry());

        // set the factory on the listener bean
        builder.getRawBeanDefinition().setFactoryBeanName(factoryId);
        builder.getRawBeanDefinition().setFactoryMethodName("createCommandFactory");
View Full Code Here

        }

        BeanDefinition factoryDefinition = factoryBuilder.getBeanDefinition();
        String factoryId = parserContext.getReaderContext().generateBeanName(factoryDefinition);
       
        BeanDefinitionHolder factoryHolder = new BeanDefinitionHolder(factoryDefinition, factoryId);
        registerBeanDefinition(factoryHolder, parserContext.getRegistry());

        // set the factory on the listener bean
        builder.getRawBeanDefinition().setFactoryBeanName(factoryId);
        builder.getRawBeanDefinition().setFactoryMethodName("createUserManager");
View Full Code Here

   */
  public Object parsePropertySubElement(Element ele, BeanDefinition bd, String defaultValueType) {
    if (!isDefaultNamespace(getNamespaceURI(ele))) {
      return parseNestedCustomElement(ele, bd);
    } else if (nodeNameEquals(ele, BEAN_ELEMENT)) {
      BeanDefinitionHolder nestedBd = parseBeanDefinitionElement(ele, bd);
      if (nestedBd != null) {
        nestedBd = decorateBeanDefinitionIfRequired(ele, nestedBd, bd);
      }
      return nestedBd;
    } else if (nodeNameEquals(ele, REF_ELEMENT)) {
View Full Code Here

  }

  public BeanDefinitionHolder decorateBeanDefinitionIfRequired(Element ele,
      BeanDefinitionHolder definitionHolder, BeanDefinition containingBd) {

    BeanDefinitionHolder finalDefinition = definitionHolder;

    // Decorate based on custom attributes first.
    NamedNodeMap attributes = ele.getAttributes();
    for (int i = 0; i < attributes.getLength(); i++) {
      Node node = attributes.item(i);
View Full Code Here

        + ObjectUtils.getIdentityHexString(innerDefinition);
    if (logger.isDebugEnabled()) {
      logger.debug("Using generated bean name [" + id + "] for nested custom element '"
          + ele.getNodeName() + "'");
    }
    return new BeanDefinitionHolder(innerDefinition, id);
  }
View Full Code Here

    bd.setScope(scope);
    bd.setAutowireMode(GenericBeanDefinition.AUTOWIRE_NO);
    bd.setDependencyCheck(AbstractBeanDefinition.DEPENDENCY_CHECK_NONE);
    ConstructorArgumentValues cav = bd.getConstructorArgumentValues();
    cav.addIndexedArgumentValue(0, file);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(bd, beanName, new String[] {});
    BeanDefinitionReaderUtils.registerBeanDefinition(holder, fact);

  }
View Full Code Here

                        } 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<ValueHolder> l
                                        = bdh.getBeanDefinition().getConstructorArgumentValues()
                                            .getGenericArgumentValues();
                                   
                                    ConstructorArgumentValues.ValueHolder v
                                        = l.get(0);
                                   
View Full Code Here

                    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

TOP

Related Classes of org.springframework.beans.factory.config.BeanDefinitionHolder

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.