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.
Modifiers | Name | Description |
---|---|---|
static String |
CLOSURE_TEXT |
|
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 |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
applyTo(SourceCode sourceCode, List<Violation> 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. |
Each concrete subclass must either set this property or define its own property with the same name
Return true if this rule should be applied for the specified ClassNode, based on the configuration of this rule.
classNode
- - the ClassNode