Search in sources :

Example 1 with PropsMetadataImpl

use of org.apache.aries.blueprint.reflect.PropsMetadataImpl in project aries by apache.

the class Parser method parseProps.

public PropsMetadata parseProps(Element element) {
    // Parse elements
    List<MapEntry> entries = new ArrayList<MapEntry>();
    NodeList nl = element.getChildNodes();
    for (int i = 0; i < nl.getLength(); i++) {
        Node node = nl.item(i);
        if (node instanceof Element) {
            Element e = (Element) node;
            if (isBlueprintNamespace(e.getNamespaceURI()) && nodeNameEquals(e, PROP_ELEMENT)) {
                entries.add(parseProperty(e));
            }
        }
    }
    return new PropsMetadataImpl(entries);
}
Also used : PropsMetadataImpl(org.apache.aries.blueprint.reflect.PropsMetadataImpl) MapEntry(org.osgi.service.blueprint.reflect.MapEntry) NodeList(org.w3c.dom.NodeList) Node(org.w3c.dom.Node) Element(org.w3c.dom.Element) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 PropsMetadataImpl (org.apache.aries.blueprint.reflect.PropsMetadataImpl)1 MapEntry (org.osgi.service.blueprint.reflect.MapEntry)1 Element (org.w3c.dom.Element)1 Node (org.w3c.dom.Node)1 NodeList (org.w3c.dom.NodeList)1