Revision: 10650
Author:   stephenle...@google.com
Date:     Thu Sep 15 09:09:17 2011
Log: Use LinkedHashMap instead of HashMap so that the methods returned by getAllInterfaceMethods() are in their declaration order, so that the generated methods will be in their declaration order.

Review at http://gwt-code-reviews.appspot.com/1549803

Review by: r...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10650

Modified:
/trunk/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java

=======================================
--- /trunk/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java Tue Apr 26 08:02:24 2011 +++ /trunk/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java Thu Sep 15 09:09:17 2011
@@ -28,6 +28,7 @@

 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;

@@ -44,7 +45,7 @@
    * @return interface methods.
    */
   public static JMethod[] getAllInterfaceMethods(JClassType type) {
-    Map<String, JMethod> methods = new HashMap<String, JMethod>();
+    Map<String, JMethod> methods = new LinkedHashMap<String, JMethod>();
     getAllInterfaceMethodsAux(type, methods);
     return methods.values().toArray(new JMethod[methods.size()]);
   }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to