public String generateFor(Class<? extends BaseMatcher> matcherClass) {
    String name = className(matcherClass);
    MatcherOf annotation = matcherClass.getAnnotation(MatcherOf.class);

    StringBuilder buf = new StringBuilder();
    for (Class targetClass : annotation.value()) {
      if (targetClass.equals(Boolean.class)) {
        buf.append("    public static BooleanMatcher<Boolean, ?> expect(boolean actual) {\n" +
                   "        return wrapped(BooleanMatcher.class, actual);\n" +
                   "    }\n");
      }

      String type = className(targetClass);
      String genericSig = annotation.directObject() ? "<T, X, M>" : "<T, M>";
      String returnType = annotation.directObject() ? "<T, X, " : "<T, ";
      buf.append("    public static <T extends ")
          .append(type)
          .append(annotation.directObject() ? "<X>, X" : "")
          .append(", M extends ")
          .append(name)
          .append(genericSig)
          .append("> ")
          .append(name)
          .append(returnType)
          .append("?> expect(T actual) {\n" + "        return wrapped(")
          .append(name)
          .append(".class, actual);\n" + "    }");
    }
    return buf.toString();
  }