use of com.puppycrawl.tools.checkstyle.api.DetailNode in project checkstyle by checkstyle.
the class JavadocTagContinuationIndentationCheck method getAllNewlineNodes.
/**
* Finds and collects all NEWLINE nodes inside DESCRIPTION node.
* @param descriptionNode DESCRIPTION node.
* @return List with NEWLINE nodes.
*/
private static List<DetailNode> getAllNewlineNodes(DetailNode descriptionNode) {
final List<DetailNode> textNodes = new ArrayList<>();
DetailNode node = JavadocUtils.getFirstChild(descriptionNode);
while (JavadocUtils.getNextSibling(node) != null) {
if (node.getType() == JavadocTokenTypes.NEWLINE) {
textNodes.add(node);
}
node = JavadocUtils.getNextSibling(node);
}
return textNodes;
}
Aggregations