Class AuditEvent
java.lang.Object
com.puppycrawl.tools.checkstyle.api.AuditEvent
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 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 ;-)
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionAuditEvent(Object source) Creates a new instance.AuditEvent(Object src, String fileName) Creates a newAuditEventinstance.AuditEvent(Object src, String fileName, Violation violation) Creates a newAuditEventinstance.
- 
Method SummaryModifier and TypeMethodDescriptionintGets the column associated with the violation.Returns name of file being audited.intgetLine()Return the line number on the source file where the event occurred.Return the violation associated to the event.Returns id of module.Gets the audit event severity level.The object on which the Event initially occurred.Gets the name of the source for the violation.Gets the violation.
- 
Field Details- 
sourceThe object on which the Event initially occurred.
- 
fileNameFilename event associated with.
- 
violationViolation associated with the event.
 
- 
- 
Constructor Details- 
AuditEventCreates a new instance.- Parameters:
- source- the object that created the event
 
- 
AuditEventCreates a newAuditEventinstance.- Parameters:
- src- source of the event
- fileName- file associated with the event
 
- 
AuditEventCreates a newAuditEventinstance.- Parameters:
- src- source of the event
- fileName- file associated with the event
- violation- the actual violation
- Throws:
- IllegalArgumentException- if- srcis- null.
 
 
- 
- 
Method Details- 
getSourceThe object on which the Event initially occurred.- Returns:
- the object on which the Event initially occurred
 
- 
getFileNameReturns name of file being audited.- Returns:
- the file name currently being audited or null if there is no relation to a file.
 
- 
getLineReturn 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.
 
- 
getMessageReturn the violation associated to the event.- Returns:
- the event violation
 
- 
getColumnGets the column associated with the violation.- Returns:
- the column associated with the violation
 
- 
getSeverityLevelGets the audit event severity level.- Returns:
- the audit event severity level
 
- 
getModuleIdReturns id of module.- Returns:
- the identifier of the module that generated the event. Can return null.
 
- 
getSourceNameGets the name of the source for the violation.- Returns:
- the name of the source for the violation
 
- 
getViolationGets the violation.- Returns:
- the violation
 
 
-