public static void addDeclaredMethodsFromInterfaces ( ClassNode cNode , Map < String , MethodNode > methodsMap ) { // add in unimplemented abstract methods from the interfaces for ( ClassNode iface : cNode . getInterfaces ( ) ) { Map < String , MethodNode > ifaceMethodsMap = iface . getDeclaredMethodsMap ( ) ; for ( Map . Entry < String , MethodNode > entry : ifaceMethodsMap . entrySet ( ) ) { String methSig = entry . getKey ( ) ; if ( ! methodsMap . containsKey ( methSig ) ) { methodsMap . put ( methSig , entry . getValue ( ) ) ; } } } }
Add in methods from all interfaces . Existing entries in the methods map take precedence . Methods from interfaces visited early take precedence over later ones .