if (argElements!=null) {
if (argElements.size()>0) {
args = new ArrayList<ArgDescriptor>(argElements.size());
}
for (Element argElement: argElements) {
ArgDescriptor argDescriptor = new ArgDescriptor();
argDescriptor.setTypeName(XmlUtil.attribute(argElement, "type"));
Element descriptorElement = XmlUtil.element(argElement);
if (descriptorElement==null) {
parse.addProblem("arg must contain exactly one descriptor element out of "+bindings.getTagNames(category)+" as contents:"+XmlUtil.toString((Element) argElement.getParentNode()), argElement);
} else {
Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, category);
argDescriptor.setDescriptor(descriptor);
}
args.add(argDescriptor);
}
}
return args;