|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.org.codenarc.rule.AbstractRule
java.org.codenarc.rule.AbstractAstVisitorRule
public abstract class AbstractAstVisitorRule extends AbstractRule
Abstract superclass for Rules that use a Groovy AST Visitor.
Each subclass must set theastVisitorClass property or else define a new
property with the same name, specifying the Class of the AstVisitor
to applied to the specified source code.
| Field Summary | |
|---|---|
protected static String |
DEFAULT_CONST_NAME
|
protected static String |
DEFAULT_FIELD_NAME
|
protected static String |
DEFAULT_TEST_CLASS_NAMES
|
protected static String |
DEFAULT_TEST_FILES
|
protected static String |
DEFAULT_VAR_NAME
|
| Method Summary | |
|---|---|
void
|
applyTo(SourceCode sourceCode, List violations)
|
String
|
getApplyToClassNames()
|
AstVisitor
|
getAstVisitor()
|
protected Class
|
getAstVisitorClass()
Each concrete subclass must either set this property or define its own property with the same name |
String
|
getDoNotApplyToClassNames()
|
void
|
setApplyToClassNames(String applyToClassNames)
|
void
|
setDoNotApplyToClassNames(String doNotApplyToClassNames)
|
protected boolean
|
shouldApplyThisRuleTo(org.codehaus.groovy.ast.ClassNode classNode)
Return true if this rule should be applied for the specified ClassNode, based on the configuration of this rule. |
| Field Detail |
|---|
protected static final String DEFAULT_CONST_NAME
protected static final String DEFAULT_FIELD_NAME
protected static final String DEFAULT_TEST_CLASS_NAMES
protected static final String DEFAULT_TEST_FILES
protected static final String DEFAULT_VAR_NAME
| Method Detail |
|---|
@Override public void applyTo(SourceCode sourceCode, List violations)
public String getApplyToClassNames()
public AstVisitor getAstVisitor()
protected Class getAstVisitorClass()
public String getDoNotApplyToClassNames()
public void setApplyToClassNames(String applyToClassNames)
public void setDoNotApplyToClassNames(String doNotApplyToClassNames)
protected boolean shouldApplyThisRuleTo(org.codehaus.groovy.ast.ClassNode classNode)
classNode - - the ClassNode
Groovy Documentation