[Simple-support] Exporting Java bean methods to XML
Brought to you by:
niallg
|
From: simon m. <sim...@ho...> - 2011-06-17 04:16:32
|
I'm sure I'm missing something terribly simple here but, while I can export fields with no trouble, methods always give me a constructor error.
For example a simple class
@Root
class MyClass {
@Element(name="name")
public String getName() {
return "Simon"
}
}
Always throws an Exception.
I am hoping to expose a bunch of classes as XML and they use getters for the most part, to export fields directly would be a right pain. This must be simple right?
Cheers
Simon
Simon Mottram
TEL
+64 (09) 575 4574
MOB
+64 (021) 243 7745
WEB
Linked In |
Soundcloud
|