Wednesday, July 28, 2010

@ConstructorProperties annotation

I recently put together a GWT web front end (Client) for an existing
Client & Server application written in Java.

I struggled to define my GWT RPC enabled classes in such a way that I
could have final member variables (as I desired Immutable objects).

The only workable solution I found was CustomFieldSerializers; however
these are not ideal because you have to write a custom field
serializer for every GWT RPC enabled class and for every change in
your class the serializer must be updated.

It would be ideal if the GWT compiler added support for the
@ConstructorProperties annotation and used the information in the
annotated constructor to reconstruct instances for RPC; instead of
requiring the no-args constructor for RPC.

I searched this group before posting and did not find any mention of
@ConstructorProperties. If anyone has already found a solution for
this problem or knows if Google is planning on implementing something
like this I would love to know!

Thanks

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate