code: protected static IJavaClassMethod findMethod( IJavaClassInfo cls, String name, int numArgs ) {
      IJavaClassMethod match = findUniqueMethodInList( cls.getDeclaredMethods(), cls, name, numArgs );
  
      if (match != null) {
        return match;
      }
  
      match = findDeclaredMethod( cls, name, numArgs );
      if (match != null) {
        return match;
      }
  
      if ( name.equals("toString") || name.equals("equals") || name.equals("hashCode")) {
        return findMethod( JavaTypes.OBJECT().getBackingClassInfo(), name, numArgs );
      }
  
      throw new IllegalArgumentException("No method named " + name + " with " + numArgs + " arguments found starting from class " + cls);
    }
docs: ------------------------ IJavaClassMethod Resolution