> As I understand it, final fields are treated as transient by GWT-RPC's
> serializer. Also note that for a class to be serializable, it also
> needs a no-arg constructor. :( This constructor can be private,
> however.
True. There is a technically a pending-review patch to GWT that would
make final fields work, but you're still stuck with the no-arg
constructor.
I haven't been following this thread super closely, but I think your
best bet would be to write a custom field serialization. I haven't had
to write one of these myself yet, but it lets you side step the default
reflection-based serialization and instantiate the classes however you
need to.
There are quite a few examples of these in the GWT code base, typically
for the collection classes like java.util.ArrayList, HashMap, etc. E.g.
ArrayList_CustomFieldSerializer.
- Stephen