[Simple-support] Enhancement request
Brought to you by:
niallg
|
From: Marco V. <ve...@zh...> - 2007-06-04 19:12:35
|
Hi
I found your Simple XML serialization framework. It's a great software.
It saved me a lot of work.
When I use the "@Commit" annotation the methode must be declared public.
I want that this methode is only accessible for the simple xml
serializer. I want to declare the methode private. For this the
setAccessible(true) methode must be called before the methode is
invoked. Otherwise IllegalAccessException will be thrown.
For me I have patched the class simple.xml.load.Schema as following:
public void commit(Object source) throws Exception {
if(commit != null) {
commit.setAccessible(true); //Patch: So you can invoke private methode
if(isContextual(commit)) {
commit.invoke(source, table);
} else {
commit.invoke(source);
}
}
}
The same I have done for the annotation "@Validate", "@Persist" and
"@Complete".
Wath do you think about this enhancement?
Best Regards,
Marco
|