public final class JavadocUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JavadocUtils.JavadocTagType
The type of Javadoc tag we want returned.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsInBranch(DetailNode node,
int type)
Checks whether node contains any node of specified type among children on any deep level.
|
static String |
escapeAllControlChars(String text)
Replace all control chars with escaped symbols.
|
static DetailNode |
findFirstToken(DetailNode detailNode,
int type)
Returns the first child token that has a specified type.
|
static DetailNode |
getFirstChild(DetailNode node)
Gets first child node of specified node.
|
static String |
getJavadocCommentContent(DetailAST javadocCommentBegin)
Get content of Javadoc comment.
|
static JavadocTags |
getJavadocTags(TextBlock textBlock,
JavadocUtils.JavadocTagType tagType)
Gets validTags from a given piece of Javadoc.
|
static DetailNode |
getNextSibling(DetailNode node)
Gets next sibling of specified node.
|
static DetailNode |
getNextSibling(DetailNode node,
int tokenType)
Gets next sibling of specified node with the specified type.
|
static DetailNode |
getPreviousSibling(DetailNode node)
Gets previous sibling of specified node.
|
static String |
getTagName(DetailNode javadocTagSection)
Gets tag name from javadocTagSection.
|
static int |
getTokenId(String name)
Returns the ID of a token for a given name.
|
static String |
getTokenName(int id)
Returns the name of a token for a given ID.
|
static boolean |
isJavadocComment(DetailAST blockCommentBegin)
Checks block comment content starts with '*' javadoc comment identifier.
|
static boolean |
isJavadocComment(String commentContent)
Checks that commentContent starts with '*' javadoc comment identifier.
|
public static JavadocTags getJavadocTags(TextBlock textBlock, JavadocUtils.JavadocTagType tagType)
textBlock - the Javadoc comment to process.tagType - the type of validTags we're interested inpublic static boolean isJavadocComment(String commentContent)
commentContent - content of block commentpublic static boolean isJavadocComment(DetailAST blockCommentBegin)
blockCommentBegin - block comment ASTpublic static String getJavadocCommentContent(DetailAST javadocCommentBegin)
javadocCommentBegin - Javadoc comment ASTpublic static DetailNode findFirstToken(DetailNode detailNode, int type)
detailNode - Javadoc AST nodetype - the token type to matchpublic static DetailNode getFirstChild(DetailNode node)
node - DetailNodepublic static boolean containsInBranch(DetailNode node, int type)
node - DetailNodetype - token typepublic static DetailNode getNextSibling(DetailNode node)
node - DetailNodepublic static DetailNode getNextSibling(DetailNode node, int tokenType)
node - DetailNodetokenType - javadoc token typepublic static DetailNode getPreviousSibling(DetailNode node)
node - DetailNodepublic static String getTokenName(int id)
id - the ID of the token name to getpublic static int getTokenId(String name)
name - the name of the token ID to getpublic static String getTagName(DetailNode javadocTagSection)
javadocTagSection - to get tag name from.public static String escapeAllControlChars(String text)
text - the String to process.Copyright © 2001–2018. All rights reserved.