|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
public abstract class Check
The base class for checks.
| Constructor Summary | |
|---|---|
Check()
|
|
| Method Summary | |
|---|---|
void |
beginTree(DetailAST aRootAST)
Called before the starting to process a tree. |
void |
destroy()
Destroy the check. |
void |
finishTree(DetailAST aRootAST)
Called after finished processing a tree. |
int[] |
getAcceptableTokens()
The configurable token set. |
ClassLoader |
getClassLoader()
Returns the class loader associated with the tree. |
abstract int[] |
getDefaultTokens()
Returns the default token a check is interested in. |
FileContents |
getFileContents()
Returns the file contents associated with the tree. |
String[] |
getLines()
Returns the lines associated with the tree. |
int[] |
getRequiredTokens()
The tokens that this check must be registered for. |
protected int |
getTabWidth()
|
Set<String> |
getTokenNames()
Returns the tokens registered for the check. |
void |
init()
Initialise the check. |
void |
leaveToken(DetailAST aAST)
Called after all the child nodes have been process. |
void |
log(int aLineNo,
int aColNo,
String aKey,
Object... aArgs)
Log a message that has column information. |
void |
log(int aLine,
String aKey,
Object... aArgs)
Log a message that has no column information. |
void |
setClassLoader(ClassLoader aLoader)
Set the class loader associated with the tree. |
void |
setFileContents(FileContents aContents)
Set the file contents associated with the tree. |
void |
setMessages(LocalizedMessages aMessages)
Set the global object used to collect messages. |
void |
setTabWidth(int aTabWidth)
Set the tab width to report errors with. |
void |
setTokens(String[] aStrRep)
Adds a set of tokens the check is interested in. |
void |
visitToken(DetailAST aAST)
Called to process a token. |
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
|---|
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity |
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
|---|
configure, contextualize, finishLocalSetup, getConfiguration, setupChild |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Check()
| Method Detail |
|---|
public abstract int[] getDefaultTokens()
TokenTypespublic int[] getAcceptableTokens()
TokenTypespublic int[] getRequiredTokens()
TokenTypespublic final void setTokens(String[] aStrRep)
aStrRep - the string representation of the tokens interested inpublic final Set<String> getTokenNames()
public final void setMessages(LocalizedMessages aMessages)
aMessages - the messages to log withpublic void init()
public void destroy()
public void beginTree(DetailAST aRootAST)
aRootAST - the root of the treepublic void finishTree(DetailAST aRootAST)
aRootAST - the root of the treepublic void visitToken(DetailAST aAST)
aAST - the token to processpublic void leaveToken(DetailAST aAST)
aAST - the token leavingpublic final String[] getLines()
public final void setFileContents(FileContents aContents)
aContents - the managerpublic final FileContents getFileContents()
public final void setClassLoader(ClassLoader aLoader)
aLoader - the class loaderpublic final ClassLoader getClassLoader()
protected final int getTabWidth()
public final void setTabWidth(int aTabWidth)
aTabWidth - an int value
public final void log(int aLine,
String aKey,
Object... aArgs)
AbstractViolationReporter
log in class AbstractViolationReporteraLine - the line number where the error was foundaKey - the message that describes the erroraArgs - the details of the messageMessageFormat
public final void log(int aLineNo,
int aColNo,
String aKey,
Object... aArgs)
AbstractViolationReporter
log in class AbstractViolationReporteraLineNo - the line number where the error was foundaColNo - the column number where the error was foundaKey - the message that describes the erroraArgs - the details of the messageMessageFormat
|
Back to the Checkstyle Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||