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: rice@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10650 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java b/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java
index 34629bc..a77c502 100644
--- a/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java
+++ b/user/src/com/google/gwt/user/rebind/AbstractGeneratorClassCreator.java
@@ -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()]);
   }