if (attributes == null) {
throw new RuntimeOperationsException(new IllegalArgumentException(
"AttributeList attributes cannot be null"),
"Cannot invoke a setter of " + m_className);
}
AttributeList resultList = new AttributeList();
// if attributeNames is empty, nothing more to do
if (attributes.isEmpty()) {
return resultList;
}
// for each attribute, try to set it and add to the result list if
// successful
for (Iterator i = attributes.iterator(); i.hasNext();) {
Attribute attr = (Attribute) i.next();
try {
setAttribute(attr);
String name = attr.getName();
Object value = getAttribute(name);
resultList.add(new Attribute(name, value));
} catch (Exception e) {
e.printStackTrace();
}
}
return resultList;