int index)
{
if (name.equals("nestedBean")) {
((DynaBean) parent).set(
"nestedBean",
new NestedTestBean("newName"));
return true;
}
else if (name.equals("beans")) {
DynaBean bean = (DynaBean) parent;
Object beans[] = (Object[]) bean.get("beans");
if (beans == null || index >= beans.length) {
beans = new NestedTestBean[index + 1];
bean.set("beans", beans);
}
beans[index] = new NestedTestBean("newName");
return true;
}
else if (name.equals("integers")) {
DynaBean bean = (DynaBean) parent;
bean.set("integers", index, new Integer(0));