public void loadMethods(Class<?> interfaceClass){
        HashMap<String, ArrayList<Method>> nameToMethods
                = new HashMap<>();

        for (Method method : interfaceClass.getDeclaredMethods()){
            ArrayList<Method> list = nameToMethods.get(method.getName());
            if (list == null){
                list = new ArrayList<Method>();
                nameToMethods.put(method.getName(), list);
            }
            list.add(method);
        }

        mapping_search: for (int i = 0; i < methodDefs.length; i++){
            MethodDef methodDef = methodDefs[i];
            ArrayList<Method> methods = nameToMethods.get(methodDef.name);
            if (methods == null)
                continue;
            
            for (Method method : methods){
                if (methodEquals(methodDef, method)){
                    methodMap.put(method, i);
                    continue mapping_search;
                }
            }
        }
    }
Generates mappings from the given interface into the remote RMI
interface's implementation.

@param interfaceClass The interface class to use.
jme3-networking/src/main/java/com/jme3/network/rmi/RemoteObject.java