Hi! I just stumbled upon the library Objenesis.
It bypasses the neccessarity of a constructor to construct new objects, which I think is helpful for the Serialization stuff.
I just wrote a simple patch for the FieldSerializer in SpiderMonkey, so that it doesn’t need no-argument constructors in the serialized class to work, but instead uses Objenesis.
Patch: http://pastebin.com/BMnU8csM
You have to include the Objenesis-jar to the libs, but I think this is helpful, so I share it here, maybe it is of use for someone else
A no arg constructor is a very common requirement for various serialization schemes. I don’t think it’s worth adding an extra dependency just to work around this small thing. Even if it’s a small dependency.
Never mind that it may create odd undetectable issues where slightly more complicated classes don’t get initialized as they should.