Class JavadocNodeImpl
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocNodeImpl
- All Implemented Interfaces:
DetailNode
Implementation of DetailNode interface that is mutable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intColumn number.private JavadocNodeImplFirst child of this DetailAST.private intLine number.private JavadocNodeImplNext sibling node.private JavadocNodeImplParent node.private JavadocNodeImplPrevious sibling.private StringNode's text content.private intNode type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(DetailNode newChild) Adds a child node to this node.intNode column number.First child node.intNode line number.Sibling node.Parent node.Previous sibling node.getText()Node text.intgetType()Node type.voidinitialize(org.antlr.v4.runtime.Token token) Initializes the node from the given token.voidsetColumnNumber(int columnNumber) Sets column number.voidsetLineNumber(int lineNumber) Sets line number.voidsetNextSibling(DetailNode nextSibling) Sets next sibling node.voidsetParent(DetailNode node) Sets parent node.voidSets node's text content.voidsetType(int type) Sets node's type.toString()
-
Field Details
-
type
Node type. -
text
Node's text content. -
lineNumber
Line number. -
columnNumber
Column number. -
parent
Parent node. -
nextSibling
Next sibling node. -
previousSibling
Previous sibling. -
firstChild
First child of this DetailAST.
-
-
Constructor Details
-
JavadocNodeImpl
public JavadocNodeImpl()
-
-
Method Details
-
initialize
Initializes the node from the given token.- Parameters:
token- the token to initialize from.
-
getType
Description copied from interface:DetailNodeNode type.- Specified by:
getTypein interfaceDetailNode- Returns:
- node type.
- See Also:
-
getText
Description copied from interface:DetailNodeNode text.- Specified by:
getTextin interfaceDetailNode- Returns:
- node text
-
getLineNumber
Description copied from interface:DetailNodeNode line number.- Specified by:
getLineNumberin interfaceDetailNode- Returns:
- node line number
-
getColumnNumber
Description copied from interface:DetailNodeNode column number.- Specified by:
getColumnNumberin interfaceDetailNode- Returns:
- node column number.
-
getParent
Description copied from interface:DetailNodeParent node.- Specified by:
getParentin interfaceDetailNode- Returns:
- parent node.
-
getNextSibling
Description copied from interface:DetailNodeSibling node.- Specified by:
getNextSiblingin interfaceDetailNode- Returns:
- sibling node
-
getPreviousSibling
Description copied from interface:DetailNodePrevious sibling node.- Specified by:
getPreviousSiblingin interfaceDetailNode- Returns:
- sibling node
-
getFirstChild
Description copied from interface:DetailNodeFirst child node.- Specified by:
getFirstChildin interfaceDetailNode- Returns:
- first child node
-
setType
Sets node's type.- Parameters:
type- Node's type.
-
setText
Sets node's text content.- Parameters:
text- Node's text content.
-
setLineNumber
Sets line number.- Parameters:
lineNumber- Line number.
-
setColumnNumber
Sets column number.- Parameters:
columnNumber- Column number.
-
setParent
Sets parent node.- Parameters:
node- Parent node.
-
setNextSibling
Sets next sibling node.- Parameters:
nextSibling- Next sibling node.
-
addChild
Adds a child node to this node.- Parameters:
newChild- Child node to be added.
-
toString
-