docs: public static Set<MethodSymbol> findMatchingMethods(
        Name name, final Predicate<MethodSymbol> predicate, Type startClass, Types types) {
      Filter<Symbol> matchesMethodPredicate =
          sym -> sym instanceof MethodSymbol && predicate.apply((MethodSymbol) sym);
  
      Set<MethodSymbol> matchingMethods = new HashSet<>();
      // Iterate over all classes and interfaces that startClass inherits from.
      for (Type superClass : types.closure(startClass)) {
        // Iterate over all the methods declared in superClass.
        TypeSymbol superClassSymbol = superClass.tsym;
        Scope superClassSymbols = superClassSymbol.members();
        if (superClassSymbols != null) { // Can be null if superClass is a type variable
          for (Symbol symbol :
              superClassSymbols.getSymbolsByName(name, matchesMethodPredicate, NON_RECURSIVE)) {
            // By definition of the filter, we know that the symbol is a MethodSymbol.
            matchingMethods.add((MethodSymbol) symbol);
          }
        }
      }
      return matchingMethods;
    }