Metadata metadata = context.parseElement(MapMetadata.class, context.getEnclosingComponent(), (Element) element);
return metadata;
}
private Metadata parseCompleters(ParserContext context, ComponentMetadata enclosingComponent, Element element) {
MutableCollectionMetadata collection = context.createMetadata(MutableCollectionMetadata.class);
collection.setCollectionClass(List.class);
NodeList children = element.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child instanceof Element) {
Metadata metadata;
if (nodeNameEquals(child, REF)) {
metadata = context.parseElement(RefMetadata.class, context.getEnclosingComponent(), (Element) child);
} else if (nodeNameEquals(child, NULL)) {
metadata = context.parseElement(NullMetadata.class, context.getEnclosingComponent(), (Element) child);
} else if (nodeNameEquals(child, BEAN)) {
metadata = context.parseElement(BeanMetadata.class, enclosingComponent, (Element) child);
} else {
throw new IllegalStateException("Unexpected element " + child.getNodeName());
}
collection.addValue(metadata);
}
}
return collection;
}