java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.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.
| Fields inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mMessages
private com.puppycrawl.tools.checkstyle.api.LocalizedMessages mMessages
- the object for collecting messages.
AbstractCheckVisitor
public AbstractCheckVisitor()
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.