Esempio n. 1
0
  private void writeLicense(Module module) throws IOException {
    Annotation annotation =
        Util.getAnnotation(module.getUnit(), module.getAnnotations(), "license");
    if (annotation == null) return;

    String license = annotation.getPositionalArguments().get(0);
    if (license == null || license.isEmpty()) return;

    open("div class='license section'");
    around("span class='title'", "License: ");
    around("span class='value'", license);
    close("div");
  }
  protected final void writeSee(Declaration decl) throws IOException {
    Annotation see = Util.getAnnotation(decl, "see");
    if (see == null) return;

    open("div class='see section'");
    around("span class='title'", "See also: ");

    open("span class='value'");
    boolean first = true;
    for (String target : see.getPositionalArguments()) {
      if (!first) {
        write(", ");
      } else {
        first = false;
      }
      linkRenderer().to(target).useScope(decl).write();
    }
    close("span");

    close("div");
  }