Package | Description |
---|---|
com.puppycrawl.tools.checkstyle |
Contains the implementation of the Checkstyle framework.
|
com.puppycrawl.tools.checkstyle.api |
Contains the core API to be used to implement checks.
|
com.puppycrawl.tools.checkstyle.checks.javadoc |
Contains the Javadoc checks that are bundled with the main distribution.
|
com.puppycrawl.tools.checkstyle.gui |
User interface classes for CheckStyle.
|
com.puppycrawl.tools.checkstyle.utils |
Contains utils classes for checkstyle.
|
Modifier and Type | Field and Description |
---|---|
private DetailNode |
JavadocDetailNodeParser.ParseStatus.tree
DetailNode tree (is null if parsing fails).
|
Modifier and Type | Method and Description |
---|---|
private DetailNode |
JavadocDetailNodeParser.convertParseTreeToDetailNode(org.antlr.v4.runtime.tree.ParseTree parseTreeNode)
Converts ParseTree (that is generated by ANTLRv4) to DetailNode tree.
|
DetailNode |
JavadocDetailNodeParser.ParseStatus.getTree()
Getter for DetailNode tree.
|
private static DetailNode |
DetailNodeTreeStringPrinter.parseFile(java.io.File file)
Parse a file and return the parse tree.
|
static DetailNode |
DetailNodeTreeStringPrinter.parseJavadocAsDetailNode(DetailAST blockComment)
Parse block comment DetailAST as Javadoc DetailNode tree.
|
private static DetailNode |
DetailNodeTreeStringPrinter.parseJavadocAsDetailNode(java.lang.String javadocComment)
Parse javadoc comment to DetailNode tree.
|
Modifier and Type | Method and Description |
---|---|
private void |
JavadocDetailNodeParser.adjustFirstLineToJavadocIndent(DetailNode tree,
int javadocColumnNumber)
Adjust first line nodes to javadoc indent.
|
private JavadocNodeImpl |
JavadocDetailNodeParser.createJavadocNode(org.antlr.v4.runtime.tree.ParseTree parseTree,
DetailNode parent,
int index)
Creates JavadocNodeImpl node on base of ParseTree node.
|
private static java.lang.String |
DetailNodeTreeStringPrinter.getIndentation(DetailNode node)
Get indentation for a node.
|
static java.lang.String |
DetailNodeTreeStringPrinter.printTree(DetailNode ast,
java.lang.String rootPrefix,
java.lang.String prefix)
Print AST.
|
void |
JavadocDetailNodeParser.ParseStatus.setTree(DetailNode tree)
Sets DetailNode tree.
|
Modifier and Type | Method and Description |
---|---|
DetailNode[] |
DetailNode.getChildren()
Array of children.
|
DetailNode |
DetailNode.getParent()
Parent node.
|
Modifier and Type | Class and Description |
---|---|
class |
JavadocNodeImpl
Implementation of DetailNode interface that is mutable.
|
Modifier and Type | Field and Description |
---|---|
private DetailNode[] |
JavadocNodeImpl.children
Array of child nodes.
|
private DetailNode |
JavadocNodeImpl.parent
Parent node.
|
Modifier and Type | Method and Description |
---|---|
DetailNode[] |
JavadocNodeImpl.getChildren() |
private static DetailNode |
JavadocParagraphCheck.getNearestEmptyLine(DetailNode node)
Finds and returns nearest empty line in javadoc.
|
private static DetailNode |
JavadocParagraphCheck.getNearestNode(DetailNode node)
Returns nearest node.
|
DetailNode |
JavadocNodeImpl.getParent() |
Modifier and Type | Method and Description |
---|---|
private static java.util.List<DetailNode> |
JavadocTagContinuationIndentationCheck.getAllNewlineNodes(DetailNode descriptionNode)
Finds and collects all NEWLINE nodes inside DESCRIPTION node.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractJavadocCheck.beginJavadocTree(DetailNode rootAst)
Called before the starting to process a tree.
|
private void |
JavadocParagraphCheck.checkEmptyLine(DetailNode newline)
Determines whether or not the next line after empty line has paragraph tag in the beginning.
|
private void |
AtclauseOrderCheck.checkOrderInTagSection(DetailNode javadoc)
Checks order of atclauses in tag section node.
|
private void |
JavadocParagraphCheck.checkParagraphTag(DetailNode tag)
Determines whether or not the line with paragraph tag has previous empty line.
|
void |
AbstractJavadocCheck.finishJavadocTree(DetailNode rootAst)
Called after finished processing a tree.
|
private static java.util.List<DetailNode> |
JavadocTagContinuationIndentationCheck.getAllNewlineNodes(DetailNode descriptionNode)
Finds and collects all NEWLINE nodes inside DESCRIPTION node.
|
private static java.lang.String |
SummaryJavadocCheck.getFirstSentence(DetailNode ast)
Finds and returns first sentence.
|
private static DetailNode |
JavadocParagraphCheck.getNearestEmptyLine(DetailNode node)
Finds and returns nearest empty line in javadoc.
|
private static DetailNode |
JavadocParagraphCheck.getNearestNode(DetailNode node)
Returns nearest node.
|
private boolean |
SingleLineJavadocCheck.hasJavadocInlineTags(DetailNode javadocRoot)
Checks if comment has in-line tags which are not ignored.
|
private boolean |
SingleLineJavadocCheck.hasJavadocTags(DetailNode javadocRoot)
Checks if comment has javadoc tags which are not ignored.
|
private static boolean |
JavadocParagraphCheck.isEmptyLine(DetailNode newLine)
Determines whether or not the line is empty line.
|
private static boolean |
NonEmptyAtclauseDescriptionCheck.isEmptyTag(DetailNode tagNode)
Tests if at-clause tag is empty.
|
private static boolean |
JavadocParagraphCheck.isFirstParagraph(DetailNode paragraphTag)
Determines whether or not the line with paragraph tag is first line in javadoc.
|
private static boolean |
JavadocParagraphCheck.isImmediatelyFollowedByText(DetailNode tag)
Tests whether the paragraph tag is immediately followed by the text.
|
private static boolean |
JavadocTagContinuationIndentationCheck.isInlineDescription(DetailNode description)
Checks, if description node is a description of in-line tag.
|
private static boolean |
JavadocParagraphCheck.isLastEmptyLine(DetailNode newLine)
Tests if NEWLINE node is a last node in javadoc.
|
private static boolean |
SummaryJavadocCheck.isOnlyInheritDoc(DetailNode ast)
Finds if inheritDoc is placed properly in java doc.
|
private boolean |
SingleLineJavadocCheck.isTagIgnored(DetailNode javadocTagSection)
Checks if list of ignored tags contains javadocTagSection's javadoc tag.
|
void |
AbstractJavadocCheck.leaveJavadocToken(DetailNode ast)
Called after all the child nodes have been process.
|
private void |
AbstractJavadocCheck.processTree(DetailNode root)
Processes JavadocAST tree notifying Check.
|
void |
JavadocNodeImpl.setChildren(DetailNode... children)
Sets array of child nodes.
|
void |
JavadocNodeImpl.setParent(DetailNode parent)
Sets parent node.
|
private boolean |
AbstractJavadocCheck.shouldBeProcessed(DetailNode curNode)
Checks whether the current node should be processed by the check.
|
void |
NonEmptyAtclauseDescriptionCheck.visitJavadocToken(DetailNode ast) |
void |
SummaryJavadocCheck.visitJavadocToken(DetailNode ast) |
abstract void |
AbstractJavadocCheck.visitJavadocToken(DetailNode ast)
Called to process a Javadoc token.
|
void |
JavadocParagraphCheck.visitJavadocToken(DetailNode ast) |
void |
AtclauseOrderCheck.visitJavadocToken(DetailNode ast) |
void |
SingleLineJavadocCheck.visitJavadocToken(DetailNode ast) |
void |
JavadocTagContinuationIndentationCheck.visitJavadocToken(DetailNode ast) |
private void |
AbstractJavadocCheck.walk(DetailNode root)
Processes a node calling Check at interested nodes.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<DetailAST,DetailNode> |
ParseTreeTablePresentation.blockCommentToJavadocTree
Cache to store already parsed Javadoc comments.
|
Modifier and Type | Method and Description |
---|---|
private DetailNode |
ParseTreeTablePresentation.getJavadocTree(DetailAST blockComment)
Gets Javadoc (DetailNode) tree of specified block comments.
|
Modifier and Type | Method and Description |
---|---|
private int |
CodeSelectorPresentation.findLastPosition(DetailNode detailNode)
Finds the last position of node without children.
|
private void |
CodeSelectorPresentation.findSelectionPositions(DetailNode detailNode)
Find start and end selection positions from DetailNode line and Column.
|
private java.lang.Object |
ParseTreeTablePresentation.getValueAtDetailNode(DetailNode node,
int column)
Gets a value for DetailNode object.
|
Constructor and Description |
---|
CodeSelectorPresentation(DetailNode node,
java.util.List<java.lang.Integer> lines2position)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static DetailNode |
JavadocUtils.findFirstToken(DetailNode detailNode,
int type)
Returns the first child token that has a specified type.
|
static DetailNode |
JavadocUtils.getFirstChild(DetailNode node)
Gets first child node of specified node.
|
static DetailNode |
JavadocUtils.getNextSibling(DetailNode node)
Gets next sibling of specified node.
|
static DetailNode |
JavadocUtils.getNextSibling(DetailNode node,
int tokenType)
Gets next sibling of specified node with the specified type.
|
static DetailNode |
JavadocUtils.getPreviousSibling(DetailNode node)
Gets previous sibling of specified node.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
JavadocUtils.containsInBranch(DetailNode node,
int type)
Checks whether node contains any node of specified type among children on any deep level.
|
static DetailNode |
JavadocUtils.findFirstToken(DetailNode detailNode,
int type)
Returns the first child token that has a specified type.
|
static DetailNode |
JavadocUtils.getFirstChild(DetailNode node)
Gets first child node of specified node.
|
static DetailNode |
JavadocUtils.getNextSibling(DetailNode node)
Gets next sibling of specified node.
|
static DetailNode |
JavadocUtils.getNextSibling(DetailNode node,
int tokenType)
Gets next sibling of specified node with the specified type.
|
static DetailNode |
JavadocUtils.getPreviousSibling(DetailNode node)
Gets previous sibling of specified node.
|
static java.lang.String |
JavadocUtils.getTagName(DetailNode javadocTagSection)
Gets tag name from javadocTagSection.
|