本文整理汇总了Java中com.puppycrawl.tools.checkstyle.api.JavadocTokenTypes.EOF属性的典型用法代码示例。如果您正苦于以下问题:Java JavadocTokenTypes.EOF属性的具体用法?Java JavadocTokenTypes.EOF怎么用?Java JavadocTokenTypes.EOF使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.puppycrawl.tools.checkstyle.api.JavadocTokenTypes
的用法示例。
在下文中一共展示了JavadocTokenTypes.EOF属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTokenName
/**
* Returns the name of a token for a given ID.
* @param id
* the ID of the token name to get
* @return a token name
*/
public static String getTokenName(int id) {
final String name;
if (id == JavadocTokenTypes.EOF) {
name = "EOF";
}
else if (id > TOKEN_VALUE_TO_NAME.length - 1) {
throw new IllegalArgumentException(UNKNOWN_JAVADOC_TOKEN_ID_EXCEPTION_MESSAGE + id);
}
else {
name = TOKEN_VALUE_TO_NAME[id];
if (name == null) {
throw new IllegalArgumentException(UNKNOWN_JAVADOC_TOKEN_ID_EXCEPTION_MESSAGE + id);
}
}
return name;
}
示例2: isImmediatelyFollowedByText
/**
* Tests whether the paragraph tag is immediately followed by the text.
* @param tag html tag.
* @return true, if the paragraph tag is immediately followed by the text.
*/
private static boolean isImmediatelyFollowedByText(DetailNode tag) {
final DetailNode nextSibling = JavadocUtils.getNextSibling(tag);
return nextSibling.getType() == JavadocTokenTypes.NEWLINE
|| nextSibling.getType() == JavadocTokenTypes.EOF
|| CommonUtils.startsWithChar(nextSibling.getText(), ' ');
}