code: public static boolean hasMethod(TypeDef typeDef, String method) {
         return unrollHierarchy(typeDef)
         .stream()
         .flatMap(h -> h.getMethods().stream())
         .filter(m -> method.equals(m.getName()))
         .findAny()
         .isPresent();
      }
docs: Check if method exists on the specified type.
  @param typeDef   The type.
  @param method    The method name.
  @return          True if method is found, false otherwise.