On Nov 30, 1:56 am, "[email protected]" <[email protected]> wrote:
> I know the <super-source> element can be used to add unimplemented
> classes to the JRE, but can you use it to add a missing static method?
>
> For example, say you need the "static double cbrt(double a)"
> java.lang.Math method that calculates the cube root of a. How would
> you go about implementing that, if it's actually possible?

I would:
 1. create an issue on the GWT issue tracker
 2. make a patch and submit it for review at http://gwt-code-reviews.appspot.com
for it to be included in a future release of GWT
 3. either:
   a. use a patched GWT (you just have to include your modified
Math.java in the gwt-user.jar, in place of the original one)
   b. override the original Math.java by way of the classpath (put
your modified Math.java in a com/google/gwt/emul/java/lang folder and
ensure it's on the classpath *before* gwt-user.jar)
   c. use a <super-source> in your module to override the Math
implementation (if you use it in a module that'll be imported in your
"application module", ensure the <inherits> for your module defining
the <super-source> comes *after* the <inherits/> for
com.google.gwt.core.Core)

See http://code.google.com/p/google-web-toolkit/wiki/ResourceOracle to
understand 3.b and 3.c re. classpath/<inherits/> order

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to