java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor
com.puppycrawl.tools.checkstyle.bcel.checks.AbstractReferenceCheck
- All Implemented Interfaces:
- com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable, com.puppycrawl.tools.checkstyle.bcel.IObjectSetVisitor
- Direct Known Subclasses:
- UnreadFieldCheck, UnusedMethodCheck
- public abstract class AbstractReferenceCheck
- extends com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor
Abstract class for checks that require reference information.
| Fields inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
|
| Methods inherited from class com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor |
destroy, getClassFileVisitor, getGenericVisitor, init, leaveObject, leaveSet, log, log, setMessages, visitObject, visitSet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mScope
private com.puppycrawl.tools.checkstyle.api.Scope mScope
- the scope for recorded references
mIgnoreClassNameRegexp
private org.apache.regexp.RE mIgnoreClassNameRegexp
- the regexp to match class names against
mIgnoreNameRegexp
private org.apache.regexp.RE mIgnoreNameRegexp
- the regexp to match names against
AbstractReferenceCheck
public AbstractReferenceCheck()
- Creates a
AbstractReferenceCheck.
setScope
public void setScope(java.lang.String aScopeName)
- Sets the scope for recorded references.
ignore
protected boolean ignore(java.lang.String aClassName,
org.apache.bcel.classfile.FieldOrMethod aFieldOrMethod)
- Determines whether a class name, and field or method should be ignored.
equalScope
private boolean equalScope(org.apache.bcel.classfile.FieldOrMethod aFieldOrMethod)
- Tests whether the scope of a field or method is compatible
with the scope of this check. References for compatible
fields or methods should be checked.
setIgnoreClassName
public void setIgnoreClassName(java.lang.String aFormat)
throws org.apache.commons.beanutils.ConversionException
- Set the ignore class name to the specified regular expression.
setIgnoreName
public void setIgnoreName(java.lang.String aFormat)
throws org.apache.commons.beanutils.ConversionException
- Set the ignore name format to the specified regular expression.
getVisitor
public com.puppycrawl.tools.checkstyle.bcel.IDeepVisitor getVisitor()
- Description copied from class:
com.puppycrawl.tools.checkstyle.bcel.AbstractCheckVisitor
- Gets the deep BCEL visitor.
getReferenceDAO
public com.puppycrawl.tools.checkstyle.bcel.classfile.ReferenceDAO getReferenceDAO()
- Gets the DAO that manages references for this check.
findJavaClassDef
protected com.puppycrawl.tools.checkstyle.bcel.classfile.JavaClassDefinition findJavaClassDef(org.apache.bcel.classfile.JavaClass aJavaClass)
- Finds a JavaClassDefinition for a JavaClass.