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

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.bcel
Class AbstractCheckVisitor  view AbstractCheckVisitor download AbstractCheckVisitor.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended bycom.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
          extended bycom.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor
All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable, IObjectSetVisitor

public abstract class AbstractCheckVisitor
extends com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
implements IObjectSetVisitor

Abstract class for checks with visitors.


Field Summary
private  com.puppycrawl.tools.checkstyle.api.LocalizedMessages mMessages
          the object for collecting messages.
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
 
Constructor Summary
AbstractCheckVisitor()
           
 
Method Summary
 void destroy()
          Destroy the check.
 org.apache.bcel.classfile.Visitor getClassFileVisitor()
           
 org.apache.bcel.generic.Visitor getGenericVisitor()
           
abstract  IDeepVisitor getVisitor()
          Gets the deep BCEL visitor.
 void init()
          Initialse the check.
 void leaveObject(java.lang.Object aObject)
          Finish the visit an object.
 void leaveSet(java.util.Set aJavaClassDefs)
          Finish the visit of a set.
protected  void log(int aLine, int aCol, java.lang.String aKey, java.lang.Object[] aArgs)
          Log a message that has column information.
protected  void log(int aLine, java.lang.String aKey, java.lang.Object[] aArgs)
          Log an error message.
 void setMessages(com.puppycrawl.tools.checkstyle.api.LocalizedMessages aMessages)
          Set the global object used to collect messages.
 void visitObject(java.lang.Object aObject)
          Visit an object.
 void visitSet(java.util.Set aJavaClassDefs)
          Visit a set itself.
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, setSeverity
 
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

mMessages

private com.puppycrawl.tools.checkstyle.api.LocalizedMessages mMessages
the object for collecting messages.

Constructor Detail

AbstractCheckVisitor

public AbstractCheckVisitor()
Method Detail

getClassFileVisitor

public org.apache.bcel.classfile.Visitor getClassFileVisitor()

getGenericVisitor

public org.apache.bcel.generic.Visitor getGenericVisitor()

init

public void init()
Initialse the check. This is the time to verify that the check has everything required to perform it job.


destroy

public void destroy()
Destroy the check. It is being retired from service.


setMessages

public final void setMessages(com.puppycrawl.tools.checkstyle.api.LocalizedMessages aMessages)
Set the global object used to collect messages.


log

protected final void log(int aLine,
                         java.lang.String aKey,
                         java.lang.Object[] aArgs)
Log an error message.


log

protected void log(int aLine,
                   int aCol,
                   java.lang.String aKey,
                   java.lang.Object[] aArgs)
Description copied from class: com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
Log a message that has column information.


visitObject

public void visitObject(java.lang.Object aObject)
Description copied from interface: IObjectSetVisitor
Visit an object. Normally this is an object of the set.

Specified by:
visitObject in interface IObjectSetVisitor

leaveObject

public void leaveObject(java.lang.Object aObject)
Description copied from interface: IObjectSetVisitor
Finish the visit an object. Normally this is an object of the set.

Specified by:
leaveObject in interface IObjectSetVisitor

visitSet

public void visitSet(java.util.Set aJavaClassDefs)
Description copied from interface: IObjectSetVisitor
Visit a set itself.

Specified by:
visitSet in interface IObjectSetVisitor

leaveSet

public void leaveSet(java.util.Set aJavaClassDefs)
Description copied from interface: IObjectSetVisitor
Finish the visit of a set.

Specified by:
leaveSet in interface IObjectSetVisitor

getVisitor

public abstract IDeepVisitor getVisitor()
Gets the deep BCEL visitor.