mil.dod.th.word.htm.doclet/src/org/udri/doclet/msword/MSHTMLDoclet.java
private static void writeExecutableMember(ExecutableMemberDoc member,
            boolean isOverride) {

        StringBuilder memberStr = new StringBuilder(
                "<h4 style='mso-list:l5 level4 lfo1'>");

        // Add intra-document link
        // The current class could be a parent class or interface, so always get
        // the current class.
        //Also, it looks like links are capped at 40 characters. Methods are the most
        //likely culprit, so let's just put it here for now.  --jkg 1/5/2012
        String link = CURRENT_CLASSDOC.name() + member.name();
        if (link.length() > LINK_MAX_LEN)
        {
            link = link.substring(0,LINK_MAX_LEN);
        }
        _docLinks.add(link);
        memberStr.append("<a name=\"").append(link);
        memberStr.append("\"></a><![if !supportLists]><span ");
        memberStr
        .append("style='mso-fareast-font-family:\"Times New Roman\"'><span style='mso-list:Ignore'><span ");
        memberStr
        .append("style='font:7.0pt \"Times New Roman\"'>&nbsp;&nbsp; </span></span></span><![endif]><span ");
        memberStr
        .append("style='mso-fareast-font-family:\"Times New Roman\"'>");
        memberStr.append(getVisibility(member)).append(" ");

        if (member.isFinal()) {
            memberStr.append("final ");
        }
        if (member.isStatic()) {
            memberStr.append("static ");
        }
        if (member.isSynchronized()) {
            memberStr.append("synchronized ");
        }
        if (member.isSynthetic()) {
            memberStr.append("synthetic ");
        }
        if (member.isInterface()) {
            memberStr.append("interface ");
        }
        if (member.isMethod()) {
            MethodDoc method = (MethodDoc) member;

            if (method.isAbstract()) {
                memberStr.append("abstract ");
            }

            memberStr.append(
                    generateGenericTypeInfo(method.returnType(), false))
                    .append(" ");
        }

        memberStr.append(member.name()).append("(");

        // For each parameter, write it out, taking into account
        // a possible variable length argument as the last param.
        if (member.parameters().length > 0) {
            int i = 0;
            int len = member.parameters().length;
            for (Parameter param : member.parameters()) {
                i++;
                memberStr
                .append(generateGenericTypeInfo(param.type(),
                        member.isVarArgs() && (i == len))).append(" ")
                        .append(param.name());
                if (i < len) {
                    memberStr.append(", ");
                }
            }
        }
        memberStr.append(")<o:p></o:p></span></h4>");

        // If the method marked with the inherit tag, don't do these guys.
        boolean isInherited = false;
        for (Tag tag : member.inlineTags()) {
            if (tag.name().indexOf(Tags.INHERITDOC.getName()) > -1) {
                isInherited = true;
                break;
            }
        }

        _msHTM.println(memberStr);

        if (isOverride) {
            writeMethodOverrideComment((MethodDoc) member);
        } else {
            writeComment(member);
        }

        writeTags(member);

        if (!isInherited && !isOverride) {
            writeParameters(member.parameters(), member);

            Tag[] returnTags = member.tags("@return");
            if (returnTags.length > 0) {
                StringBuilder returnStr = new StringBuilder(
                        "<p class=MsoNormal style='margin-left:50.0pt'><span class=GramE><b style='mso-bidi-font-weight:normal'>");
                returnStr
                .append("Returns</b><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>");

                returnStr.append(getTagComment(returnTags[0]));
                returnStr.append("</p>");

                _msHTM.println(returnStr.toString());
            }

            writeExceptions(member);
        }
    }
/**
     * Write out Ctor or Method doc element, adding documentation for overridden
     * methods.
     */
Write out Ctor or Method doc element, adding documentation for overridden
methods.
Write out Ctor or Method doc element adding documentation for overridden methods .
private static void writeExecutableMember(ExecutableMemberDoc member,
            boolean isOverride) {
        StringBuilder memberStr = new StringBuilder(
                "<h4 style='mso-list:l5 level4 lfo1'>");
        String link = CURRENT_CLASSDOC.name() + member.name();
        if (link.length() > LINK_MAX_LEN)
        {
            link = link.substring(0,LINK_MAX_LEN);
        }
        _docLinks.add(link);
        memberStr.append("<a name=\"").append(link);
        memberStr.append("\"></a><![if !supportLists]><span ");
        memberStr
        .append("style='mso-fareast-font-family:\"Times New Roman\"'><span style='mso-list:Ignore'><span ");
        memberStr
        .append("style='font:7.0pt \"Times New Roman\"'>&nbsp;&nbsp; </span></span></span><![endif]><span ");
        memberStr
        .append("style='mso-fareast-font-family:\"Times New Roman\"'>");
        memberStr.append(getVisibility(member)).append(" ");
        if (member.isFinal()) {
            memberStr.append("final ");
        }
        if (member.isStatic()) {
            memberStr.append("static ");
        }
        if (member.isSynchronized()) {
            memberStr.append("synchronized ");
        }
        if (member.isSynthetic()) {
            memberStr.append("synthetic ");
        }
        if (member.isInterface()) {
            memberStr.append("interface ");
        }
        if (member.isMethod()) {
            MethodDoc method = (MethodDoc) member;
            if (method.isAbstract()) {
                memberStr.append("abstract ");
            }
            memberStr.append(
                    generateGenericTypeInfo(method.returnType(), false))
                    .append(" ");
        }
        memberStr.append(member.name()).append("(");
        if (member.parameters().length > 0) {
            int i = 0;
            int len = member.parameters().length;
            for (Parameter param : member.parameters()) {
                i++;
                memberStr
                .append(generateGenericTypeInfo(param.type(),
                        member.isVarArgs() && (i == len))).append(" ")
                        .append(param.name());
                if (i < len) {
                    memberStr.append(", ");
                }
            }
        }
        memberStr.append(")<o:p></o:p></span></h4>");
        boolean isInherited = false;
        for (Tag tag : member.inlineTags()) {
            if (tag.name().indexOf(Tags.INHERITDOC.getName()) > -1) {
                isInherited = true;
                break;
            }
        }
        _msHTM.println(memberStr);
        if (isOverride) {
            writeMethodOverrideComment((MethodDoc) member);
        } else {
            writeComment(member);
        }
        writeTags(member);
        if (!isInherited && !isOverride) {
            writeParameters(member.parameters(), member);
            Tag[] returnTags = member.tags("@return");
            if (returnTags.length > 0) {
                StringBuilder returnStr = new StringBuilder(
                        "<p class=MsoNormal style='margin-left:50.0pt'><span class=GramE><b style='mso-bidi-font-weight:normal'>");
                returnStr
                .append("Returns</b><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>");
                returnStr.append(getTagComment(returnTags[0]));
                returnStr.append("</p>");
                _msHTM.println(returnStr.toString());
            }
            writeExceptions(member);
        }
    }
private static void writeExecutableMember ( ExecutableMemberDoc member , boolean isOverride ) { StringBuilder memberStr = new StringBuilder ( "<h4 style='mso-list:l5 level4 lfo1'>" ) ; String link = CURRENT_CLASSDOC . name ( ) + member . name ( ) ; if ( link . length ( ) > LINK_MAX_LEN ) { link = link . substring ( 0 , LINK_MAX_LEN ) ; } _docLinks . add ( link ) ; memberStr . append ( "<a name=\"" ) . append ( link ) ; memberStr . append ( "\"></a><![if !supportLists]><span " ) ; memberStr . append ( "style='mso-fareast-font-family:\"Times New Roman\"'><span style='mso-list:Ignore'><span " ) ; memberStr . append ( "style='font:7.0pt \"Times New Roman\"'>&nbsp;&nbsp; </span></span></span><![endif]><span " ) ; memberStr . append ( "style='mso-fareast-font-family:\"Times New Roman\"'>" ) ; memberStr . append ( getVisibility ( member ) ) . append ( " " ) ; if ( member . isFinal ( ) ) { memberStr . append ( "final " ) ; } if ( member . isStatic ( ) ) { memberStr . append ( "static " ) ; } if ( member . isSynchronized ( ) ) { memberStr . append ( "synchronized " ) ; } if ( member . isSynthetic ( ) ) { memberStr . append ( "synthetic " ) ; } if ( member . isInterface ( ) ) { memberStr . append ( "interface " ) ; } if ( member . isMethod ( ) ) { MethodDoc method = ( MethodDoc ) member ; if ( method . isAbstract ( ) ) { memberStr . append ( "abstract " ) ; } memberStr . append ( generateGenericTypeInfo ( method . returnType ( ) , false ) ) . append ( " " ) ; } memberStr . append ( member . name ( ) ) . append ( "(" ) ; if ( member . parameters ( ) . length > 0 ) { int i = 0 ; int len = member . parameters ( ) . length ; for ( Parameter param : member . parameters ( ) ) { i ++ ; memberStr . append ( generateGenericTypeInfo ( param . type ( ) , member . isVarArgs ( ) && ( i == len ) ) ) . append ( " " ) . append ( param . name ( ) ) ; if ( i < len ) { memberStr . append ( ", " ) ; } } } memberStr . append ( ")<o:p></o:p></span></h4>" ) ; boolean isInherited = false ; for ( Tag tag : member . inlineTags ( ) ) { if ( tag . name ( ) . indexOf ( Tags . INHERITDOC . getName ( ) ) > - 1 ) { isInherited = true ; break ; } } _msHTM . println ( memberStr ) ; if ( isOverride ) { writeMethodOverrideComment ( ( MethodDoc ) member ) ; } else { writeComment ( member ) ; } writeTags ( member ) ; if ( ! isInherited && ! isOverride ) { writeParameters ( member . parameters ( ) , member ) ; Tag [ ] returnTags = member . tags ( "@return" ) ; if ( returnTags . length > 0 ) { StringBuilder returnStr = new StringBuilder ( "<p class=MsoNormal style='margin-left:50.0pt'><span class=GramE><b style='mso-bidi-font-weight:normal'>" ) ; returnStr . append ( "Returns</b><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>" ) ; returnStr . append ( getTagComment ( returnTags [ 0 ] ) ) ; returnStr . append ( "</p>" ) ; _msHTM . println ( returnStr . toString ( ) ) ; } writeExceptions ( member ) ; } }
Write out Ctor or Method doc element, adding documentation for overridden
 methods.
Write out Ctor or Method doc element adding documentation for overridden methods .
// Add intra-document link // The current class could be a parent class or interface, so always get // the current class. //Also, it looks like links are capped at 40 characters. Methods are the most //likely culprit, so let's just put it here for now.  --jkg 1/5/2012 // For each parameter, write it out, taking into account // a possible variable length argument as the last param. // If the method marked with the inherit tag, don't do these guys.