当前位置: 首页>>代码示例>>Java>>正文


Java HtmlTree类代码示例

本文整理汇总了Java中com.sun.tools.doclets.formats.html.markup.HtmlTree的典型用法代码示例。如果您正苦于以下问题:Java HtmlTree类的具体用法?Java HtmlTree怎么用?Java HtmlTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HtmlTree类属于com.sun.tools.doclets.formats.html.markup包,在下文中一共展示了HtmlTree类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: throwsTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content throwsTagOutput(ThrowsTag throwsTag) {
    ContentBuilder body = new ContentBuilder();
    Content excName = (throwsTag.exceptionType() == null) ?
            new RawHtml(throwsTag.exceptionName()) :
            htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
            throwsTag.exceptionType()));
    body.addContent(HtmlTree.CODE(excName));
    Content desc = htmlWriter.commentTagsToContent(throwsTag, null,
        throwsTag.inlineTags(), false);
    if (desc != null && !desc.isEmpty()) {
        body.addContent(" - ");
        body.addContent(desc);
    }
    HtmlTree result = HtmlTree.DD(body);
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:TagletWriterImpl.java

示例2: deprecatedTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content deprecatedTagOutput(Doc doc) {
    ContentBuilder result = new ContentBuilder();
    Tag[] deprs = doc.tags("deprecated");
    if (doc instanceof ClassDoc) {
        if (Util.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Tag[] commentTags = deprs[0].inlineTags();
                if (commentTags.length > 0) {
                    result.addContent(commentTagsToOutput(null, doc,
                        deprs[0].inlineTags(), false)
                    );
                }
            }
        }
    } else {
        MemberDoc member = (MemberDoc) doc;
        if (Util.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Content body = commentTagsToOutput(null, doc,
                    deprs[0].inlineTags(), false);
                if (!body.isEmpty())
                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
            }
        } else {
            if (Util.isDeprecated(member.containingClass())) {
                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                        new StringContent(configuration.getText("doclet.Deprecated"))));
                result.addContent(RawHtml.nbsp);
            }
        }
    }
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:43,代码来源:TagletWriterImpl.java

示例3: paramTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content paramTagOutput(ParamTag paramTag, String paramName) {
    ContentBuilder body = new ContentBuilder();
    body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
    body.addContent(" - ");
    body.addContent(htmlWriter.commentTagsToContent(paramTag, null, paramTag.inlineTags(), false));
    HtmlTree result = HtmlTree.DD(body);
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:TagletWriterImpl.java

示例4: propertyTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content propertyTagOutput(Tag tag, String prefix) {
    Content body = new ContentBuilder();
    body.addContent(new RawHtml(prefix));
    body.addContent(" ");
    body.addContent(HtmlTree.CODE(new RawHtml(tag.text())));
    body.addContent(".");
    Content result = HtmlTree.P(body);
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:TagletWriterImpl.java

示例5: returnTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content returnTagOutput(Tag returnTag) {
    ContentBuilder result = new ContentBuilder();
    result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
            new StringContent(configuration.getText("doclet.Returns")))));
    result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent(
            returnTag, null, returnTag.inlineTags(), false)));
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:TagletWriterImpl.java

示例6: simpleTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content simpleTagOutput(Tag[] simpleTags, String header) {
    ContentBuilder result = new ContentBuilder();
    result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
    ContentBuilder body = new ContentBuilder();
    for (int i = 0; i < simpleTags.length; i++) {
        if (i > 0) {
            body.addContent(", ");
        }
        body.addContent(htmlWriter.commentTagsToContent(
                simpleTags[i], null, simpleTags[i].inlineTags(), false));
    }
    result.addContent(HtmlTree.DD(body));
    return result;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:TagletWriterImpl.java

示例7: deprecatedTagOutput

import com.sun.tools.doclets.formats.html.markup.HtmlTree; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public Content deprecatedTagOutput(Doc doc) {
    ContentBuilder result = new ContentBuilder();
    Tag[] deprs = doc.tags("deprecated");
    if (doc instanceof ClassDoc) {
        if (utils.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Tag[] commentTags = deprs[0].inlineTags();
                if (commentTags.length > 0) {
                    result.addContent(commentTagsToOutput(null, doc,
                        deprs[0].inlineTags(), false)
                    );
                }
            }
        }
    } else {
        MemberDoc member = (MemberDoc) doc;
        if (utils.isDeprecated((ProgramElementDoc) doc)) {
            result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                    new StringContent(configuration.getText("doclet.Deprecated"))));
            result.addContent(RawHtml.nbsp);
            if (deprs.length > 0) {
                Content body = commentTagsToOutput(null, doc,
                    deprs[0].inlineTags(), false);
                if (!body.isEmpty())
                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
            }
        } else {
            if (utils.isDeprecated(member.containingClass())) {
                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                        new StringContent(configuration.getText("doclet.Deprecated"))));
                result.addContent(RawHtml.nbsp);
            }
        }
    }
    return result;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:43,代码来源:TagletWriterImpl.java


注:本文中的com.sun.tools.doclets.formats.html.markup.HtmlTree类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。