com.puppycrawl.tools.checkstyle.api
Class AuditEvent
EventObject
com.puppycrawl.tools.checkstyle.api.AuditEvent
public final class AuditEvent
extends EventObject
Raw event for audit.
I'm not very satisfied about the design of this event since there are
optional methods that will return null in most of the case. This will
need some work to clean it up especially if we want to introduce
a more sequential reporting action rather than a packet error
reporting. This will allow for example to follow the process quickly
in an interface or a servlet (yep, that's cool to run a check via
a web interface in a source repository ;-)
- Stephane Bailliez
AuditListener
AuditEvent
public AuditEvent(Object aSource)
Creates a new instance.
aSource
- the object that created the event
AuditEvent
public AuditEvent(Object aSrc,
String aFileName)
Creates a new AuditEvent
instance.
aSrc
- source of the eventaFileName
- file associated with the event
AuditEvent
public AuditEvent(Object aSrc,
String aFileName,
LocalizedMessage aMessage)
Creates a new AuditEvent
instance.
aSrc
- source of the eventaFileName
- file associated with the eventaMessage
- the actual message
getColumn
public int getColumn()
- the column associated with the message *
getFileName
public String getFileName()
- the file name currently being audited or null if there is
no relation to a file.
getLine
public 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.
- an integer representing the line number in the file source code.
getLocalizedMessage
public LocalizedMessage getLocalizedMessage()
- the localized message *
getMessage
public String getMessage()
return the message associated to the event.
- the event message
getSeverityLevel
public SeverityLevel getSeverityLevel()
- the audit event severity level *
getSourceName
public String getSourceName()
- the name of the source for the message *