/** * Creates JavadocNodeImpl node on base of ParseTree node. * * @param parseTree ParseTree node * @param parent DetailNode that will be parent of new node * @param index child index that has new node * @return JavadocNodeImpl node on base of ParseTree node. */ private JavadocNodeImpl createJavadocNode(ParseTree parseTree, DetailNode parent, int index) { final JavadocNodeImpl node = new JavadocNodeImpl(); if (parseTree.getChildCount() == 0 || "Text".equals(getNodeClassNameWithoutContext(parseTree))) { node.setText(parseTree.getText()); } else { node.setText(getFormattedNodeClassNameWithoutContext(parseTree)); } node.setColumnNumber(getColumn(parseTree)); node.setLineNumber(getLine(parseTree) + blockCommentLineNumber); node.setIndex(index); node.setType(getTokenType(parseTree)); node.setParent(parent); node.setChildren((DetailNode[]) new JavadocNodeImpl[parseTree.getChildCount()]); return node; }
/** * Creates JavadocNodeImpl node on base of ParseTree node. * * @param parseTree ParseTree node * @param parent DetailNode that will be parent of new node * @param index child index that has new node * @return JavadocNodeImpl node on base of ParseTree node. */ private JavadocNodeImpl createJavadocNode(ParseTree parseTree, DetailNode parent, int index) { final JavadocNodeImpl node = new JavadocNodeImpl(); if (parseTree.getChildCount() == 0 || "Text".equals(getNodeClassNameWithoutContext(parseTree))) { node.setText(parseTree.getText()); } else { node.setText(getFormattedNodeClassNameWithoutContext(parseTree)); } node.setColumnNumber(getColumn(parseTree)); node.setLineNumber(getLine(parseTree) + blockCommentLineNumber); node.setIndex(index); node.setType(getTokenType(parseTree)); node.setParent(parent); node.setChildren((DetailNode[]) new JavadocNodeImpl[parseTree.getChildCount()]); return node; }