On Feb 5, 9:53 am, Syntax <[email protected]> wrote:
> I would REALLY like to be able to define my members as final; however
> as noted on the GWT serialization page:
> - Fields that are declared final are also not exchanged during RPCs,
> so they should generally be marked transient as well.
>
> I was wondering why final fields are not transferred? I can only
> imagine that when the instance is created server side it uses the no-
> args constructor and reflection to set the values?
>
> I find it quite annoying that I am required to enter a no args
> constructor, surely the RPC generator can just manually add and empty
> no args constructor if none already exists?
>
> One suggestion from a colleague was to add support for the
> @ConstructorProperties annotation to GWT serialization classes, so
> that the GWT serialization back end calls the constructor with
> arguments and matches field names with the annotation values. Has
> anyone considered this?

Just an idea but... couldn't you use a CustomFieldSerializer?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to