bean.addProperty(name, this.parseListData(ctx, bean, el));
} else if ("serviceFactories".equals(name)) {
bean.addProperty("resourceProviders", this.parseListData(ctx, bean, el));
} else if ("resourceClasses".equals(name)) {
List<String> resources = getResourceClassesFromElement(el);
MutableCollectionMetadata list = ctx.createMetadata(MutableCollectionMetadata.class);
list.setCollectionClass(List.class);
for (String res : resources) {
MutableBeanMetadata objectOfClass = createObjectOfClass(ctx, res);
list.addValue(objectOfClass);
}
bean.addProperty("serviceBeans", list);
} else if ("model".equals(name)) {
List<UserResource> resources = ResourceUtils.getResourcesFromElement(el);
MutableCollectionMetadata list = ctx.createMetadata(MutableCollectionMetadata.class);
list.setCollectionClass(List.class);
for (UserResource res : resources) {
MutablePassThroughMetadata factory = ctx.createMetadata(MutablePassThroughMetadata.class);
factory.setObject(new PassThroughCallable<Object>(res));
MutableBeanMetadata resourceBean = ctx.createMetadata(MutableBeanMetadata.class);
resourceBean.setFactoryComponent(factory);
resourceBean.setFactoryMethod("call");
list.addValue(resourceBean);
}
bean.addProperty("modelBeans", list);
} else {
setFirstChildAsProperty(el, ctx, bean, name);
}