Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.api
Class FullIdent  view FullIdent download FullIdent.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.FullIdent

public final class FullIdent
extends java.lang.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.


Field Summary
private  java.lang.StringBuffer mBuffer
          the string
private  int mColNo
          the column number
private  int mLineNo
          the line number
 
Constructor Summary
private FullIdent()
          hide default constructor
 
Method Summary
private  void append(DetailAST aAST)
          Append the specified token and also recalibrate the first line and column.
private  void append(java.lang.String aText)
          Append the specified text.
static FullIdent createFullIdent(DetailAST aAST)
          Creates a new FullIdent starting from the specified node.
static FullIdent createFullIdentBelow(DetailAST aAST)
          Creates a new FullIdent starting from the child of the specified node.
private static void extractFullIdent(FullIdent aFull, DetailAST aAST)
          Recursively extract a FullIdent.
 int getColumnNo()
           
 int getLineNo()
           
 java.lang.String getText()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mBuffer

private final java.lang.StringBuffer mBuffer
the string


mLineNo

private int mLineNo
the line number


mColNo

private int mColNo
the column number

Constructor Detail

FullIdent

private FullIdent()
hide default constructor

Method Detail

getText

public java.lang.String getText()

getLineNo

public int getLineNo()

getColumnNo

public int getColumnNo()

append

private void append(java.lang.String aText)
Append the specified text.


append

private void append(DetailAST aAST)
Append the specified token and also recalibrate the first line and column.


createFullIdent

public static FullIdent createFullIdent(DetailAST aAST)
Creates a new FullIdent starting from the specified node.


createFullIdentBelow

public static FullIdent createFullIdentBelow(DetailAST aAST)
Creates a new FullIdent starting from the child of the specified node.


extractFullIdent

private static void extractFullIdent(FullIdent aFull,
                                     DetailAST aAST)
Recursively extract a FullIdent.