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 int
Column number.private JavadocNodeImpl
First child of this DetailAST.private int
Line number.private JavadocNodeImpl
Next sibling node.private JavadocNodeImpl
Parent node.private JavadocNodeImpl
Previous sibling.private String
Node's text content.private int
Node type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(DetailNode newChild) Adds a child node to this node.int
Node column number.First child node.int
Node line number.Sibling node.Parent node.Previous sibling node.getText()
Node text.int
getType()
Node type.void
initialize
(org.antlr.v4.runtime.Token token) Initializes the node from the given token.void
setColumnNumber
(int columnNumber) Sets column number.void
setLineNumber
(int lineNumber) Sets line number.void
setNextSibling
(DetailNode nextSibling) Sets next sibling node.void
setParent
(DetailNode node) Sets parent node.void
Sets node's text content.void
setType
(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:DetailNode
Node type.- Specified by:
getType
in interfaceDetailNode
- Returns:
- node type.
- See Also:
-
getText
Description copied from interface:DetailNode
Node text.- Specified by:
getText
in interfaceDetailNode
- Returns:
- node text
-
getLineNumber
Description copied from interface:DetailNode
Node line number.- Specified by:
getLineNumber
in interfaceDetailNode
- Returns:
- node line number
-
getColumnNumber
Description copied from interface:DetailNode
Node column number.- Specified by:
getColumnNumber
in interfaceDetailNode
- Returns:
- node column number.
-
getParent
Description copied from interface:DetailNode
Parent node.- Specified by:
getParent
in interfaceDetailNode
- Returns:
- parent node.
-
getNextSibling
Description copied from interface:DetailNode
Sibling node.- Specified by:
getNextSibling
in interfaceDetailNode
- Returns:
- sibling node
-
getPreviousSibling
Description copied from interface:DetailNode
Previous sibling node.- Specified by:
getPreviousSibling
in interfaceDetailNode
- Returns:
- sibling node
-
getFirstChild
Description copied from interface:DetailNode
First child node.- Specified by:
getFirstChild
in 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
-