Method[] methods = next.getMethods();
// Comparison is based on method names only. First collect
// all methods from current interface, eliminating duplicate
// names.
currentMethodNames.clear();
for(int m = 0; m < methods.length; m++) {
currentMethodNames.add(methods[m].getName());
}
// Now check each method against list of all unique method