<replace-with> is related to "deferred binding", i.e. creating an instance through GWT.create(), where the actual class being instantiated is "bound" at compile-time, depending on properties (and/or permutations).
What you want to achieve can be done through "super sourcing". See “Overriding one package implementation with another” at http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml On Thursday, July 19, 2018 at 5:55:51 PM UTC+2, Kirill Prazdnikov wrote: > > Hi > I`m having troubles to replace one class by another > > This is the class I want to replace: > > package delightex.math.fp; > > public class FloatBits { > public static int floatToRawIntBits(float v) { return > Float.floatToIntBits(v); } > public static float intBitsToFloat(int v) { return Float.intBitsToFloat(v); > } > } > > > So I have a better one in FloatBitsJs with the same API. > And this I have in module.gwt.xml: > > <replace-with class="delightex.math.fp.FloatBitsJs"> > <when-type-is class="delightex.math.fp.FloatBits"/> > </replace-with> > > > But it does not get replaced. It still generates calls to FloatBits in > both super-dev-mode and production modes. > (Production is single permutation Chrome only "user.agent"="safari") > > Any help ? > > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
