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


Java JavadocTokenTypes.HTML_ELEMENT属性代码示例

本文整理汇总了Java中com.puppycrawl.tools.checkstyle.api.JavadocTokenTypes.HTML_ELEMENT属性的典型用法代码示例。如果您正苦于以下问题:Java JavadocTokenTypes.HTML_ELEMENT属性的具体用法?Java JavadocTokenTypes.HTML_ELEMENT怎么用?Java JavadocTokenTypes.HTML_ELEMENT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.puppycrawl.tools.checkstyle.api.JavadocTokenTypes的用法示例。


在下文中一共展示了JavadocTokenTypes.HTML_ELEMENT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSummarySentence

/**
 * Checks if period is at the end of sentence.
 * @param ast Javadoc root node.
 * @return error string
 */
private static String getSummarySentence(DetailNode ast) {
    boolean flag = true;
    final StringBuilder result = new StringBuilder(256);
    for (DetailNode child : ast.getChildren()) {
        if (ALLOWED_TYPES.contains(child.getType())) {
            result.append(child.getText());
        }
        else if (child.getType() == JavadocTokenTypes.HTML_ELEMENT
                && CommonUtils.isBlank(result.toString().trim())) {
            result.append(getStringInsideTag(result.toString(),
                    child.getChildren()[0].getChildren()[0]));
        }
        else if (child.getType() == JavadocTokenTypes.JAVADOC_TAG) {
            flag = false;
        }
        if (!flag) {
            break;
        }
    }
    return result.toString().trim();
}
 
开发者ID:rnveach,项目名称:checkstyle-backport-jre6,代码行数:26,代码来源:SummaryJavadocCheck.java

示例2: getDefaultJavadocTokens

@Override
public int[] getDefaultJavadocTokens() {
    return new int[] {
        JavadocTokenTypes.NEWLINE,
        JavadocTokenTypes.HTML_ELEMENT,
    };
}
 
开发者ID:rnveach,项目名称:checkstyle-backport-jre6,代码行数:7,代码来源:JavadocParagraphCheck.java

示例3: visitJavadocToken

@Override
public void visitJavadocToken(DetailNode ast) {
    if (ast.getType() == JavadocTokenTypes.NEWLINE && isEmptyLine(ast)) {
        checkEmptyLine(ast);
    }
    else if (ast.getType() == JavadocTokenTypes.HTML_ELEMENT
            && JavadocUtils.getFirstChild(ast).getType() == JavadocTokenTypes.P_TAG_START) {
        checkParagraphTag(ast);
    }
}
 
开发者ID:rnveach,项目名称:checkstyle-backport-jre6,代码行数:10,代码来源:JavadocParagraphCheck.java

示例4: isLastEmptyLine

/**
 * Tests if NEWLINE node is a last node in javadoc.
 * @param newLine NEWLINE node.
 * @return true, if NEWLINE node is a last node in javadoc.
 */
private static boolean isLastEmptyLine(DetailNode newLine) {
    boolean result = true;
    DetailNode nextNode = JavadocUtils.getNextSibling(newLine);
    while (nextNode != null && nextNode.getType() != JavadocTokenTypes.JAVADOC_TAG) {
        if (nextNode.getType() == JavadocTokenTypes.TEXT
                && !CommonUtils.isBlank(nextNode.getText())
                || nextNode.getType() == JavadocTokenTypes.HTML_ELEMENT) {
            result = false;
            break;
        }
        nextNode = JavadocUtils.getNextSibling(nextNode);
    }
    return result;
}
 
开发者ID:rnveach,项目名称:checkstyle-backport-jre6,代码行数:19,代码来源:JavadocParagraphCheck.java


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