Monday, January 24, 2011

Difered Binding Get Possible Instances of Interface

Hi All,

I am trying to make some tweaks to a GWT Json Parsing library (Resty-
GWT). Basically I wanted add polymorphic loading of objects. The
Server Side Jackson library handles this by adding an extra field into
the JSON that includes the Java Type to parse the object as.

At code generation time I can't know which version its actually going
to need to load. So my plan was to find the possible Sub Classes and
have a simple series else if's checking if the class name is one of
the allowed values then parsing it. This should be fairly practical as
there won't be more than a couple of possible classes most of them
time.

My problem is I can't seem to find a way via JClassType to extract a
list of implementing classes. I appreciate this is fairly expensive to
determine, however the complier must have this info to support regular
interface polymorphism.

Is there some way to obtain this info from GWT, or is there a better
way to do this?

Thanks,

Charlie M

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