Adding new emulated methods/classes

33 views
Skip to first unread message

Honza Rames

unread,
Feb 21, 2012, 8:58:24 AM2/21/12
to Google Web Toolkit
Hi everyone,
I'm merging some JAVA code with my GWT application which needs
Class.getSimpleName, since I'm already using own build of GWT trunk I
added getSimpleName to /user/super/com/google/gwt/emul/java/lang/
Class.java and built GWT but this doesn't work. I tried to search
other code modification in GWT's SVN history and I didn't find much
difference when they're making the changes to emulation classes so I
don't know what I'm doing wrong.

Any help leading to the solution would be much appreciated.

Cheers

Honza

Thomas Broyer

unread,
Feb 21, 2012, 9:29:46 AM2/21/12
to google-we...@googlegroups.com

Honza Rames

unread,
Feb 22, 2012, 11:02:15 AM2/22/12
to Google Web Toolkit
Thanks I'll look into it. Just curious, what are the files in /user/
super/com/google/gwt/emul/java/lang/ used for, it seems that emulation
can be done by modifying some of them but Class looks like to be an
exception?

On 21 ún, 15:29, Thomas Broyer <t.bro...@gmail.com> wrote:
> Seehttp://code.google.com/p/google-web-toolkit/issues/detail?id=3404

Honza Rames

unread,
Feb 22, 2012, 11:05:19 AM2/22/12
to Google Web Toolkit
Oops, I was to fast to post the question before I saw there are no
real changes in GenerateJavaAST.java. So my previous question doesn't
make much sense...

Honza Rames

unread,
Mar 6, 2012, 10:21:05 AM3/6/12
to google-we...@googlegroups.com
Hello again,
I was trying to make this work but my understanding of the GWT compiler is really limited. The patch in the issue you suggested really does something else than just modify the emulation for Class (I just overlooked it in the patch file since there are so many changes in the comments), but the way getName worked was overhauled in r5479 (so even changes made in r5226, and reverted in r5229, won't help me a lot) since code that implemented getName was removed from GenerateJavaAST (and I couldn't find the way it was replaced in r5479)  GenerateJavaAST.java was later removed in r10490. So back to my question above, how are the emulation classes implemented? Or is there some guidelines for modifying/adding emulation classes?

Thanks

Honza

Dne středa, 22. února 2012 17:05:19 UTC+1 Honza Rames napsal(a):

Dne středa, 22. února 2012 17:05:19 UTC+1 Honza Rames napsal(a):
Reply all
Reply to author
Forward
0 new messages