Java 类org.springframework.beans.factory.support.ManagedProperties 实例源码

项目:gemini.blueprint    文件:BlueprintParser.java   
/**
 * Parse a props element.
 */
public Properties parsePropsElement(Element propsEle) {
    ManagedProperties props = new OrderedManagedProperties();
    props.setSource(extractSource(propsEle));
    props.setMergeEnabled(parseMergeAttribute(propsEle));

    List propEles = DomUtils.getChildElementsByTagName(propsEle, BeanDefinitionParserDelegate.PROP_ELEMENT);
    for (Iterator it = propEles.iterator(); it.hasNext();) {
        Element propEle = (Element) it.next();
        String key = propEle.getAttribute(BeanDefinitionParserDelegate.KEY_ATTRIBUTE);
        // Trim the text value to avoid unwanted whitespace
        // caused by typical XML formatting.
        String value = DomUtils.getTextValue(propEle).trim();

        TypedStringValue keyHolder = new TypedStringValue(key);
        keyHolder.setSource(extractSource(propEle));
        TypedStringValue valueHolder = new TypedStringValue(value);
        valueHolder.setSource(extractSource(propEle));
        props.put(keyHolder, valueHolder);
    }

    return props;
}
项目:lams    文件:BeanDefinitionParserDelegate.java   
/**
 * Parse a props element.
 */
public Properties parsePropsElement(Element propsEle) {
    ManagedProperties props = new ManagedProperties();
    props.setSource(extractSource(propsEle));
    props.setMergeEnabled(parseMergeAttribute(propsEle));

    List<Element> propEles = DomUtils.getChildElementsByTagName(propsEle, PROP_ELEMENT);
    for (Element propEle : propEles) {
        String key = propEle.getAttribute(KEY_ATTRIBUTE);
        // Trim the text value to avoid unwanted whitespace
        // caused by typical XML formatting.
        String value = DomUtils.getTextValue(propEle).trim();
        TypedStringValue keyHolder = new TypedStringValue(key);
        keyHolder.setSource(extractSource(propEle));
        TypedStringValue valueHolder = new TypedStringValue(value);
        valueHolder.setSource(extractSource(propEle));
        props.put(keyHolder, valueHolder);
    }

    return props;
}
项目:spring4-understanding    文件:BeanDefinitionParserDelegate.java   
/**
 * Parse a props element.
 */
public Properties parsePropsElement(Element propsEle) {
    ManagedProperties props = new ManagedProperties();
    props.setSource(extractSource(propsEle));
    props.setMergeEnabled(parseMergeAttribute(propsEle));

    List<Element> propEles = DomUtils.getChildElementsByTagName(propsEle, PROP_ELEMENT);
    for (Element propEle : propEles) {
        String key = propEle.getAttribute(KEY_ATTRIBUTE);
        // Trim the text value to avoid unwanted whitespace
        // caused by typical XML formatting.
        String value = DomUtils.getTextValue(propEle).trim();
        TypedStringValue keyHolder = new TypedStringValue(key);
        keyHolder.setSource(extractSource(propEle));
        TypedStringValue valueHolder = new TypedStringValue(value);
        valueHolder.setSource(extractSource(propEle));
        props.put(keyHolder, valueHolder);
    }

    return props;
}
项目:spring    文件:BeanDefinitionParserDelegate.java   
/**
 * Parse a props element.
 */
public Properties parsePropsElement(Element propsEle) {
    ManagedProperties props = new ManagedProperties();
    props.setSource(extractSource(propsEle));
    props.setMergeEnabled(parseMergeAttribute(propsEle));

    List<Element> propEles = DomUtils.getChildElementsByTagName(propsEle, PROP_ELEMENT);
    for (Element propEle : propEles) {
        String key = propEle.getAttribute(KEY_ATTRIBUTE);
        // Trim the text value to avoid unwanted whitespace
        // caused by typical XML formatting.
        String value = DomUtils.getTextValue(propEle).trim();
        TypedStringValue keyHolder = new TypedStringValue(key);
        keyHolder.setSource(extractSource(propEle));
        TypedStringValue valueHolder = new TypedStringValue(value);
        valueHolder.setSource(extractSource(propEle));
        props.put(keyHolder, valueHolder);
    }

    return props;
}
项目:class-guard    文件:BeanDefinitionParserDelegate.java   
/**
 * Parse a props element.
 */
public Properties parsePropsElement(Element propsEle) {
    ManagedProperties props = new ManagedProperties();
    props.setSource(extractSource(propsEle));
    props.setMergeEnabled(parseMergeAttribute(propsEle));

    List<Element> propEles = DomUtils.getChildElementsByTagName(propsEle, PROP_ELEMENT);
    for (Element propEle : propEles) {
        String key = propEle.getAttribute(KEY_ATTRIBUTE);
        // Trim the text value to avoid unwanted whitespace
        // caused by typical XML formatting.
        String value = DomUtils.getTextValue(propEle).trim();
        TypedStringValue keyHolder = new TypedStringValue(key);
        keyHolder.setSource(extractSource(propEle));
        TypedStringValue valueHolder = new TypedStringValue(value);
        valueHolder.setSource(extractSource(propEle));
        props.put(keyHolder, valueHolder);
    }

    return props;
}