protected final void doc(MethodOrValue d) throws IOException {
    // put the id on the td because IE8 doesn't support id attributes on tr (yeah right)
    open("tr");

    open("td id='" + d.getName() + "' nowrap");
    writeIcon(d);
    write(d.getName());
    close("td");

    open("td");
    writeLinkOneSelf(d);
    writeLinkSource(d);
    writeTagged(d);

    open("div class='signature'");
    around("span class='modifiers'", getModifiers(d));
    write(" ");
    linkRenderer().to(d.getType()).write();
    write(" ");
    write(d.getName());
    if (isConstantValue(d)) {
      writeConstantValue((Value) d);
    }
    if (d instanceof Method) {
      Method m = (Method) d;
      writeTypeParameters(m);
      writeParameterList(m);
    }
    close("div");
    writeDescription(d);
    close("td");
    close("tr");
  }
 private void writeLinkSource(MethodOrValue m) throws IOException {
   if (!tool.isIncludeSourceCode()) {
     return;
   }
   String srcUrl;
   if (m.isToplevel()) {
     srcUrl = linkRenderer().getSrcUrl(m);
   } else {
     srcUrl = linkRenderer().getSrcUrl(m.getContainer());
   }
   int[] lines = tool.getDeclarationSrcLocation(m);
   if (lines != null) {
     open(
         "a class='link-source-code' title='Link to source code' href='"
             + srcUrl
             + "#"
             + lines[0]
             + ","
             + lines[1]
             + "'");
     write("<i class='icon-source-code'></i>");
     write("Source Code");
     close("a");
   }
 }
 public MethodDefinitionBuilder parameter(Parameter param, int flags) {
   String paramName = param.getName();
   String aliasedName = paramName;
   MethodOrValue mov = CodegenUtil.findMethodOrValueForParam(param);
   int mods = 0;
   if (!(mov instanceof Value) || !mov.isVariable() || mov.isCaptured()) {
     mods |= FINAL;
   }
   if (mov instanceof Method || mov instanceof Value && mov.isVariable() && mov.isCaptured()) {
     aliasedName = Naming.getAliasedParameterName(param);
   }
   TypedDeclaration nonWideningDecl;
   ProducedType nonWideningType;
   if (mov instanceof Value) {
     ProducedTypedReference typedRef = gen.getTypedReference(mov);
     ProducedTypedReference nonWideningTypedRef = gen.nonWideningTypeDecl(typedRef);
     nonWideningType = gen.nonWideningType(typedRef, nonWideningTypedRef);
     nonWideningDecl = nonWideningTypedRef.getDeclaration();
   } else {
     nonWideningType = param.getType();
     nonWideningDecl = param;
   }
   return parameter(mods, paramName, aliasedName, param, nonWideningDecl, nonWideningType, flags);
 }