Package us.codecraft.tinyioc.beans

Examples of us.codecraft.tinyioc.beans.PropertyValue


      if (node instanceof Element) {
        Element propertyEle = (Element) node;
        String name = propertyEle.getAttribute("name");
        String value = propertyEle.getAttribute("value");
        if (value != null && value.length() > 0) {
          beanDefinition.getPropertyValues().addPropertyValue(new PropertyValue(name, value));
        } else {
          String ref = propertyEle.getAttribute("ref");
          if (ref == null || ref.length() == 0) {
            throw new IllegalArgumentException("Configuration problem: <property> element for property '"
                + name + "' must specify a ref or value");
          }
          BeanReference beanReference = new BeanReference(ref);
          beanDefinition.getPropertyValues().addPropertyValue(new PropertyValue(name, beanReference));
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of us.codecraft.tinyioc.beans.PropertyValue

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.