code: private void genGetAllMethod(SourceWriter sw, JMethod[] methods,
        TreeLogger treeLogger) {
      sw.println("public DeferredSelector[] getAllSelectors() {return ds;}");
      sw.println("private final DeferredSelector[] ds = new DeferredSelector[] {");
      sw.indent();
      for (JMethod m : methods) {
        Selector selectorAnnotation = m.getAnnotation(Selector.class);
        if (selectorAnnotation == null) {
          continue;
        }
        String selector = selectorAnnotation.value();
  
        sw.println("new DeferredSelector() {");
        sw.indent();
        sw
            .println("public String getSelector() { return \"" + selector
                + "\"; }");
        sw
            .println("public NodeList<Element> runSelector(Node ctx) { return " +
                (m.getName() + (m.getParameters().length == 0 ? "()" : "(ctx)")) +
                ("NodeList".equals(m.getReturnType().getSimpleSourceName()) ? "" : ".get()") + ";}"
            );
        sw.outdent();
        sw.println("},");
      }
      sw.outdent();
      sw.println("};");
    }
docs: used by benchmark harness