List<ApplicationMetaDataGenerator.PropBindingDeclarations> bindings = ApplicationMetaDataGenerator.mapProperties(beanTypeClass);
for(ApplicationMetaDataGenerator.PropBindingDeclarations binding : bindings)
{
final BindingDeclaration bindDecl = binding.getBindingDeclaration();
//if(bindDecl.skip()) continue;
// create and register setters
final Method setter = findMatchingSetter(bindDecl.getJavaName(), beanTypeClass);
mut.register(bindDecl.getJavaName(), new Setter() {
@Override
public void invoke(Object entity, Object value) {
try {
if(entity instanceof AutoBeanStub)
setter.invoke(((AutoBeanStub)entity).as(), value);
else
setter.invoke(entity, value);
} catch (Throwable e) {
throw new RuntimeException("Failed to invoke "+setter.getName(), e);
}
}
});
final Method getter = findMatchingGetter(bindDecl.getJavaName(), beanTypeClass);
mut.register(bindDecl.getJavaName(), new Getter() {
@Override
public Object invoke(Object entity) {
try {
if(entity instanceof AutoBeanStub)