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

Quick Search    Search Deep

com.mycompany.listeners
Class VerboseListener  view VerboseListener download VerboseListener.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended bycom.mycompany.listeners.VerboseListener
All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.AuditListener, com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable, java.util.EventListener

public class VerboseListener
extends com.puppycrawl.tools.checkstyle.api.AutomaticBean
implements com.puppycrawl.tools.checkstyle.api.AuditListener

An AuditListener that reports every event to an output stream.


Field Summary
private  boolean mCloseOut
          close output stream
private  int mErrors
          number of errors and exceptions in the audit of one file
private  int mTotalErrors
          total number of errors and exceptions
private  java.io.PrintWriter mWriter
          where to write messages
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
 
Constructor Summary
VerboseListener()
           
 
Method Summary
 void addError(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
          Notify that an audit error was discovered on a specific file.
 void addException(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt, java.lang.Throwable aThrowable)
          Notify that an exception happened while performing audit.
 void auditFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
          Notify that the audit is finished.
 void auditStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
          Notify that the audit is about to start.
 void fileFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
          Notify that audit is finished on a specific file.
 void fileStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
          Notify that audit is about to start on a specific file.
private  void printEvent(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
          Prints event information to standard output.
 void setFile(java.lang.String aFileName)
          Sets the output stream to a file.
 
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
 

Field Detail

mWriter

private java.io.PrintWriter mWriter
where to write messages


mCloseOut

private boolean mCloseOut
close output stream


mTotalErrors

private int mTotalErrors
total number of errors and exceptions


mErrors

private int mErrors
number of errors and exceptions in the audit of one file

Constructor Detail

VerboseListener

public VerboseListener()
Method Detail

setFile

public void setFile(java.lang.String aFileName)
             throws java.io.FileNotFoundException
Sets the output stream to a file.


auditStarted

public void auditStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.AuditListener
Notify that the audit is about to start.

Specified by:
auditStarted in interface com.puppycrawl.tools.checkstyle.api.AuditListener

auditFinished

public void auditFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.AuditListener
Notify that the audit is finished.

Specified by:
auditFinished in interface com.puppycrawl.tools.checkstyle.api.AuditListener

fileStarted

public void fileStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.AuditListener
Notify that audit is about to start on a specific file.

Specified by:
fileStarted in interface com.puppycrawl.tools.checkstyle.api.AuditListener

fileFinished

public void fileFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.AuditListener
Notify that audit is finished on a specific file.

Specified by:
fileFinished in interface com.puppycrawl.tools.checkstyle.api.AuditListener

addError

public void addError(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.AuditListener
Notify that an audit error was discovered on a specific file.

Specified by:
addError in interface com.puppycrawl.tools.checkstyle.api.AuditListener

addException

public void addException(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt,
                         java.lang.Throwable aThrowable)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.AuditListener
Notify that an exception happened while performing audit.

Specified by:
addException in interface com.puppycrawl.tools.checkstyle.api.AuditListener

printEvent

private void printEvent(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Prints event information to standard output.