docs: @SafeVarargs
    public static boolean hasNodesOfType(Node node, final Class<? extends Node>... types) {
      class Visitor implements NodeVisitor<Node, VisitDirective> {
        boolean found;
  
        @Override
        public VisitDirective exec(Node node) {
          for (Class<?> type : types) {
            if (type.isInstance(node)) {
              found = true;
              return VisitDirective.ABORT;
            }
          }
          return VisitDirective.CONTINUE;
        }
      }
      Visitor v = new Visitor();
      visitAllNodes(node, v);
      return v.found;
    }