Monday, May 23, 2011

Re: GWT Serialization--Default Constructor Presence

Since reflection is used to instantiate the classes with something
like SerializedType.newInstance() , the default constructor has to be
present. If the mechanism would allow for instantiation using non-
default constructor, that would have required more configuration in
your code and also that would mean that the constructor argument
values would have to be transfered on the wire outside the instance,
also complicating things up.

On May 24, 9:42 am, Nitish Upreti <nitishupr...@gmail.com> wrote:
> I noticed that all the Model classes which need to implement 'Serializable'
> interface need to have a default constructor in order to  work properly. The
> Serialization otherwise fails. Why is it so?

--
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