You can copy paste the existing Collections.java from the GWT tree to your source tree in the same package path and add your own method there. The GWT compiler will super source your file meaning that it will have precedence over the GWT supplied file.
However I am not actually suggesting this for your case. The reason is the following. In normal circumstances GWT code is plain javascript and it executed in a single thread therefore the synchronized variant of a collection makes non sense. Recent advances in WWW standards include something called web workers which is basically javascript threads. I haven't used them or study them in detail to commend but my gut feeling and past experience says that their semantics will not map to java thread semantics. Vassilis On Fri, Feb 6, 2015 at 10:35 PM, <[email protected]> wrote: > Yes, I saw that documentation. It seems to assume a lot of GWT > knowledge. I doubt we can provide our own Collections implementation just > to fill in one static method. Does anyone know a more reasonable > workaround? > > > On Thursday, February 5, 2015 at 5:34:33 PM UTC-6, iza wrote: >> >> I believe super-source is what you need. Have you seen the documentation >> "Overriding one package implementation with another" at >> http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects. >> html#DevGuideModuleXml >> > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- Vassilis Virvilis -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
