Class JavadocNodeImpl
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocNodeImpl
-
- All Implemented Interfaces:
DetailNode
public class JavadocNodeImpl extends Object implements DetailNode
Implementation of DetailNode interface that is mutable.
-
-
Field Summary
Fields Modifier and Type Field Description private DetailNode[]
children
Array of child nodes.private int
columnNumber
Column number.static JavadocNodeImpl[]
EMPTY_DETAIL_NODE_ARRAY
Empty array ofDetailNode
type.private int
index
Node index among parent's children.private int
lineNumber
Line number.private DetailNode
parent
Parent node.private String
text
Node's text content.private int
type
Node type.
-
Constructor Summary
Constructors Constructor Description JavadocNodeImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DetailNode[]
getChildren()
Array of children.int
getColumnNumber()
Node column number.int
getIndex()
Node index among parent's children.int
getLineNumber()
Node line number.DetailNode
getParent()
Parent node.String
getText()
Node text.int
getType()
Node type.void
setChildren(DetailNode... children)
Sets array of child nodes.void
setColumnNumber(int columnNumber)
Sets column number.void
setIndex(int index)
Sets node's index among parent's children.void
setLineNumber(int lineNumber)
Sets line number.void
setParent(DetailNode parent)
Sets parent node.void
setText(String text)
Sets node's text content.void
setType(int type)
Sets node's type.String
toString()
-
-
-
Field Detail
-
EMPTY_DETAIL_NODE_ARRAY
public static final JavadocNodeImpl[] EMPTY_DETAIL_NODE_ARRAY
Empty array ofDetailNode
type.
-
index
private int index
Node index among parent's children.
-
type
private int type
Node type.
-
lineNumber
private int lineNumber
Line number.
-
columnNumber
private int columnNumber
Column number.
-
children
private DetailNode[] children
Array of child nodes.
-
parent
private DetailNode parent
Parent node.
-
-
Constructor Detail
-
JavadocNodeImpl
public JavadocNodeImpl()
-
-
Method Detail
-
getType
public int getType()
Description copied from interface:DetailNode
Node type.- Specified by:
getType
in interfaceDetailNode
- Returns:
- node type.
- See Also:
JavadocTokenTypes
-
getText
public String getText()
Description copied from interface:DetailNode
Node text.- Specified by:
getText
in interfaceDetailNode
- Returns:
- node text
-
getLineNumber
public int getLineNumber()
Description copied from interface:DetailNode
Node line number.- Specified by:
getLineNumber
in interfaceDetailNode
- Returns:
- node line number
-
getColumnNumber
public int getColumnNumber()
Description copied from interface:DetailNode
Node column number.- Specified by:
getColumnNumber
in interfaceDetailNode
- Returns:
- node column number.
-
getChildren
public DetailNode[] getChildren()
Description copied from interface:DetailNode
Array of children.- Specified by:
getChildren
in interfaceDetailNode
- Returns:
- array of children
-
getParent
public DetailNode getParent()
Description copied from interface:DetailNode
Parent node.- Specified by:
getParent
in interfaceDetailNode
- Returns:
- parent node.
-
getIndex
public int getIndex()
Description copied from interface:DetailNode
Node index among parent's children.- Specified by:
getIndex
in interfaceDetailNode
- Returns:
- index
-
setType
public void setType(int type)
Sets node's type.- Parameters:
type
- Node's type.
-
setText
public void setText(String text)
Sets node's text content.- Parameters:
text
- Node's text content.
-
setLineNumber
public void setLineNumber(int lineNumber)
Sets line number.- Parameters:
lineNumber
- Line number.
-
setColumnNumber
public void setColumnNumber(int columnNumber)
Sets column number.- Parameters:
columnNumber
- Column number.
-
setChildren
public void setChildren(DetailNode... children)
Sets array of child nodes.- Parameters:
children
- Array of child nodes.
-
setParent
public void setParent(DetailNode parent)
Sets parent node.- Parameters:
parent
- Parent node.
-
setIndex
public void setIndex(int index)
Sets node's index among parent's children.- Parameters:
index
- Node's index among parent's children.
-
-