com.puppycrawl.tools.checkstyle.api

Class SeverityLevelCounter

public final class SeverityLevelCounter extends Object implements AuditListener

An audit listener that counts how many AuditEvents of a given severity have been generated.

Author: lkuehne

Constructor Summary
SeverityLevelCounter(SeverityLevel aLevel)
Creates a new counter.
Method Summary
voidaddError(AuditEvent aEvt)
voidaddException(AuditEvent aEvt, Throwable aThrowable)
voidauditFinished(AuditEvent aEvt)
voidauditStarted(AuditEvent aEvt)
voidfileFinished(AuditEvent aEvt)
voidfileStarted(AuditEvent aEvt)
intgetCount()
Returns the number of counted events since audit started.

Constructor Detail

SeverityLevelCounter

public SeverityLevelCounter(SeverityLevel aLevel)
Creates a new counter.

Parameters: aLevel the severity level events need to have, must be non-null.

Method Detail

addError

public void addError(AuditEvent aEvt)
{@inheritDoc }

addException

public void addException(AuditEvent aEvt, Throwable aThrowable)
{@inheritDoc }

auditFinished

public void auditFinished(AuditEvent aEvt)
{@inheritDoc }

auditStarted

public void auditStarted(AuditEvent aEvt)
{@inheritDoc }

fileFinished

public void fileFinished(AuditEvent aEvt)
{@inheritDoc }

fileStarted

public void fileStarted(AuditEvent aEvt)
{@inheritDoc }

getCount

public int getCount()
Returns the number of counted events since audit started.

Returns: the number of counted events since audit started.