Class FullIdent
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.FullIdent
-
public final class FullIdent extends Object
Represents a full identifier, including dots, with associated position information.Identifiers such as
java.util.HashMap
are spread across multiple AST nodes in the syntax tree (three IDENT nodes, two DOT nodes). A FullIdent represents the whole String (excluding any intermediate whitespace), which is often easier to work with in Checks.- Author:
- Oliver Burn
- See Also:
TokenTypes.DOT
,TokenTypes.IDENT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FullIdent
createFullIdent(DetailAST ast)
Creates a new FullIdent starting from the specified node.static FullIdent
createFullIdentBelow(DetailAST ast)
Creates a new FullIdent starting from the child of the specified node.int
getColumnNo()
Gets the column number.int
getLineNo()
Gets the line number.String
getText()
Gets the text.String
toString()
-
-
-
Method Detail
-
createFullIdent
public static FullIdent createFullIdent(DetailAST ast)
Creates a new FullIdent starting from the specified node.- Parameters:
ast
- the node to start from- Returns:
- a
FullIdent
value
-
createFullIdentBelow
public static FullIdent createFullIdentBelow(DetailAST ast)
Creates a new FullIdent starting from the child of the specified node.- Parameters:
ast
- the parent node from where to start from- Returns:
- a
FullIdent
value
-
getLineNo
public int getLineNo()
Gets the line number.- Returns:
- the line number
-
getColumnNo
public int getColumnNo()
Gets the column number.- Returns:
- the column number
-
-