GWT Emulated classes

122 views
Skip to first unread message

dinesh kumar

unread,
Jun 5, 2018, 6:11:14 AM6/5/18
to GWT Users
I just want to know how does the emulated classes work in GWT. 

How does the GWT decides where to look for an imported class(inside JDK or emulated classes)? Where is this information is specified?

Is there any documentation for this? 

Jens

unread,
Jun 5, 2018, 6:23:45 AM6/5/18
to GWT Users
GWT has a feature called "super source" which allows you to override existing source files with your own implementation. GWT itself uses this technique to emulate JRE classes and you can use that technique as well to emulate additional classes.

Take a look at http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml and scroll a little down until you see the headline "Overriding one package implementation with another" to get a short description of "super source".

All JRE classes emulated by GWT can be found in https://github.com/gwtproject/gwt/tree/master/user/super/com/google/gwt/emul and when you look at https://github.com/gwtproject/gwt/blob/master/user/super/com/google/gwt/emul/Emulation.gwt.xml you can see the <super-source /> tag. This tag does not set a path attribute which means that the whole folder which contains the Emulation.gwt.xml file should be treated as super source.


-- J.

Thomas Broyer

unread,
Jun 6, 2018, 3:50:01 AM6/6/18
to GWT Users
Reply all
Reply to author
Forward
0 new messages