Package com.puppycrawl.tools.checkstyle
Class TreeWalkerAuditEvent
- java.lang.Object
- 
- com.puppycrawl.tools.checkstyle.TreeWalkerAuditEvent
 
- 
 public class TreeWalkerAuditEvent extends java.lang.ObjectRawTreeWalkerevent for audit.
- 
- 
Constructor SummaryConstructors Constructor Description TreeWalkerAuditEvent(FileContents fileContents, java.lang.String fileName, LocalizedMessage localizedMessage, DetailAST rootAst)Creates a newTreeWalkerAuditEventinstance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()Gets the column associated with the message.intgetColumnCharIndex()Gets the column char index associated with the message.FileContentsgetFileContents()Returns contents of the file.java.lang.StringgetFileName()Returns name of file being audited.intgetLine()Return the line number on the source file where the event occurred.LocalizedMessagegetLocalizedMessage()Gets the localized message.java.lang.StringgetMessage()Return the message associated to the event.java.lang.StringgetModuleId()Returns id of module.DetailASTgetRootAst()Gets the root element of the AST tree.java.lang.StringgetSourceName()Gets the name of the source for the message.intgetTokenType()Gets the token type of the message.
 
- 
- 
- 
Constructor Detail- 
TreeWalkerAuditEventpublic TreeWalkerAuditEvent(FileContents fileContents, java.lang.String fileName, LocalizedMessage localizedMessage, DetailAST rootAst) Creates a newTreeWalkerAuditEventinstance.- Parameters:
- fileContents- contents of the file associated with the event
- fileName- file associated with the event
- localizedMessage- the actual message
- rootAst- root AST element- DetailASTof the file
 
 
- 
 - 
Method Detail- 
getFileNamepublic java.lang.String getFileName() Returns name of file being audited.- Returns:
- the file name currently being audited or null if there is no relation to a file.
 
 - 
getFileContentspublic FileContents getFileContents() Returns contents of the file.- Returns:
- contents of the file.
 
 - 
getLocalizedMessagepublic LocalizedMessage getLocalizedMessage() Gets the localized message.- Returns:
- the localized message
 
 - 
getLinepublic int getLine() Return the line number on the source file where the event occurred. This may be 0 if there is no relation to a file content.- Returns:
- an integer representing the line number in the file source code.
 
 - 
getMessagepublic java.lang.String getMessage() Return the message associated to the event.- Returns:
- the event message
 
 - 
getColumnpublic int getColumn() Gets the column associated with the message.- Returns:
- the column associated with the message
 
 - 
getColumnCharIndexpublic int getColumnCharIndex() Gets the column char index associated with the message.- Returns:
- the column char index associated with the message
 
 - 
getModuleIdpublic java.lang.String getModuleId() Returns id of module.- Returns:
- the identifier of the module that generated the event. Can return null.
 
 - 
getSourceNamepublic java.lang.String getSourceName() Gets the name of the source for the message.- Returns:
- the name of the source for the message
 
 - 
getTokenTypepublic int getTokenType() Gets the token type of the message.- Returns:
- the token type of the message
 
 - 
getRootAstpublic DetailAST getRootAst() Gets the root element of the AST tree.- Returns:
- the root element of the AST tree
 
 
- 
 
-