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

Quick Search    Search Deep

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

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

public class CommonsLoggingListener
extends java.lang.Object
implements com.puppycrawl.tools.checkstyle.api.AuditListener

Jakarta Commons Logging listener. Note: With Ant, do not use the SimpleLog as your logger implementation as it causes an infinite loop since it writes to System.err, which Ant traps and reroutes to the logger/listener layer. Based on org.apache.tools.ant.listener.CommonsLoggingListener>org.apache.tools.ant.listener.CommonsLoggingListener


Field Summary
private static int BUFFER_CUSHION
          cushion for avoiding StringBuffer.expandCapacity
private  boolean mInitialized
          true if the log factory has been initialized
private  org.apache.commons.logging.LogFactory mLogFactory
          Factory for creating org.apache.commons.logging.Log instances
 
Constructor Summary
CommonsLoggingListener()
          Creates a CommonsLoggingListener.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_CUSHION

private static final int BUFFER_CUSHION
cushion for avoiding StringBuffer.expandCapacity

See Also:
Constant Field Values

mInitialized

private boolean mInitialized
true if the log factory has been initialized


mLogFactory

private org.apache.commons.logging.LogFactory mLogFactory
Factory for creating org.apache.commons.logging.Log instances

Constructor Detail

CommonsLoggingListener

public CommonsLoggingListener()
                       throws com.puppycrawl.tools.checkstyle.api.CheckstyleException
Creates a CommonsLoggingListener. Initializes its log factory.

Method Detail

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