binds.push(property.name, this);
}
// rewrite model code to publish their state modification
if (rewrites.add(model.type)) {
NativeObject prototype = Reflections.getPrototype(model.type);
for (Property property : model.properties) {
String name = property.name;
name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
name = (property.model.type == boolean.class ? "is" : "set").concat(name);
try {
name = Reflections.getPropertyName(model.type.getMethod(name, property.model.type));
BindingFunction function = new BindingFunction(prototype.getPropertyAs(NativeFunction.class, name), property.name);
prototype.setProperty(name, new NativeFunction(function));
} catch (Exception e) {
throw I.quiet(e);
}
}
}