*
* The input and output elements are parameter definitions and are parsed
* as such by parseParameter()
*/
protected PropertyBindingDef parseProperties(Element elem, Class klass) throws InvalidXMLException {
PropertyBindingDef propDef = new PropertyBindingDef();
List children = elem.getChildren();
Element child;
for (int i=0; i<children.size(); i++) {
child = (Element)children.get(i);
String name = child.getName().toLowerCase();
if (name.equals("input") || name.equals("output")) {
ParameterDef param = parseParameter(child);
String propName = child.getAttributeValue("property");
if (propName == null)
propName = param.getName();
if (name.equals("input")) {
Method method = getSetter(klass, propName, param);
propDef.setInput(param, method);
}
else {
Method method = getGetter(klass, propName, param);
propDef.setOutput(param, method);
}
}
}
return propDef;