use of org.apache.aries.blueprint.reflect.MapMetadataImpl in project aries by apache.
the class Parser method parseMap.
public MapMetadata parseMap(Element element, ComponentMetadata enclosingComponent) {
// Parse attributes
String keyType = element.hasAttribute(KEY_TYPE_ATTRIBUTE) ? element.getAttribute(KEY_TYPE_ATTRIBUTE) : null;
String valueType = element.hasAttribute(VALUE_TYPE_ATTRIBUTE) ? element.getAttribute(VALUE_TYPE_ATTRIBUTE) : null;
// 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 (nodeNameEquals(e, ENTRY_ELEMENT)) {
entries.add(parseMapEntry(e, enclosingComponent, null, null));
}
}
}
return new MapMetadataImpl(keyType, valueType, entries);
}