com.puppycrawl.tools.checkstyle.api
Class DetailAST
CommonAST
com.puppycrawl.tools.checkstyle.api.DetailAST
public final class DetailAST
extends CommonAST
addChild
public void addChild(AST aAST)
Adds new child to AST.
branchContains
public boolean branchContains(int aType)
Checks if this branch of the parse tree contains a token
of the provided type.
- true if and only if this branch (including this node)
contains a token of type
aType
.
findFirstToken
public DetailAST findFirstToken(int aType)
Returns the first child token that makes a specified type.
aType
- the token type to match
- the matching token, or null if no match
getChildCount
public int getChildCount()
Returns the number of child nodes one level below this node. That is is
does not recurse down the tree.
- the number of child nodes
getChildCount
public int getChildCount(int aType)
Returns the number of direct child tokens that have the specified type.
aType
- the token type to match
- the number of matching token
getColumnNo
public int getColumnNo()
getLineNo
public int getLineNo()
getParent
public DetailAST getParent()
Returns the parent token.
getPreviousSibling
public DetailAST getPreviousSibling()
Returns the previous sibling or null if no such sibling exists.
- the previous sibling or null if no such sibling exists.
initialize
public void initialize(AST aAST)
initialize
public void initialize(Token aTok)
setFirstChild
public void setFirstChild(AST aAST)
Sets this AST's first Child.
aAST
- the new first child
setNextSibling
public void setNextSibling(AST aAST)
Sets AST's next sibling.
aAST
- the new next sibling
toString
public String toString()