private void writeThrows(Declaration decl) throws IOException {
    boolean first = true;
    for (Annotation annotation : decl.getAnnotations()) {
      if (annotation.getName().equals("throws")) {

        String excType = annotation.getPositionalArguments().get(0);
        String excDesc =
            annotation.getPositionalArguments().size() == 2
                ? annotation.getPositionalArguments().get(1)
                : null;

        if (first) {
          first = false;
          open("div class='throws section'");
          around("span class='title'", "Throws: ");
          open("ul");
        }

        open("li");

        linkRenderer().to(excType).useScope(decl).write();

        if (excDesc != null) {
          write(Util.wikiToHTML(Util.unquote(excDesc), linkRenderer().useScope(decl)));
        }

        close("li");
      }
    }
    if (!first) {
      close("ul");
      close("div");
    }
  }
 private void writeDeprecated(Declaration decl) throws IOException {
   Annotation deprecated = Util.findAnnotation(decl, "deprecated");
   if (deprecated != null) {
     open("div class='deprecated section'");
     String text = "__Deprecated:__ ";
     if (!deprecated.getPositionalArguments().isEmpty()) {
       String reason = deprecated.getPositionalArguments().get(0);
       if (reason != null) {
         text += Util.unquote(reason);
       }
     }
     write(Util.wikiToHTML(text, linkRenderer().useScope(decl)));
     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");
  }