chirino/resty-gwt — pull request #130 by moravcik (2013-05-17 01:12:24+00:00)
Title: Automatic discovery of subtypes for @JsonTypeInfo

Hi,
I have found quite simple way to discovery all subtypes of generic type annotated with @JsonTypeInfo (in case of use=CLASS or MINIMAL_CLASS).
I just use TypeOracle to get all available types and I find types assignable to source type, such subtype I add to possible types in same way as for subtypes resolved from @JsonSubTypes annotation.
With this update you need not to use the @JsonSubTypes annotation anymore, as with pure Jackson library.
My motivation was to reuse the entities generated by JAXB also for GWT, for which defining the @JsonSubTypes for all specific types was quite verbose and not maintainable (via the annox:annotation plugin).

I have also fixed subtype tag mapping for MINIMAL_CLASS, where jackson uses a dot as a prefix. In reality the MINIMAL_CLASS tag is a bit more complicated in jackson library as it computes the shortest path including the packages in which the subtypes differ (prepended with the leading dot, of course), but I think it is ok to leave it as it is for now.

If you like this change you are welcome to accept it into your master branch.

Regards,
Michal Moravcik