code: public static List<FunctionalType> functionalTypesAcceptedByMethod(
        DeclaredType type,
        String methodName,
        Elements elements,
        Types types) {
      TypeElement typeElement = asElement(type);
      return methodsOn(typeElement, elements, errorType -> { })
          .stream()
          .filter(method -> method.getSimpleName().contentEquals(methodName)
              && method.getParameters().size() == 1)
          .flatMap(method -> {
            ExecutableType methodType = (ExecutableType) types.asMemberOf(type, method);
            TypeMirror parameter = getOnlyElement(methodType.getParameterTypes());
            return maybeFunctionalType(parameter, elements, types)
                .map(Stream::of).orElse(Stream.of());
          })
          .collect(toList());
    }
docs: Returns the functional types accepted by {@code methodName} on {@code type}.