public abstract class AbstractSharedAstVisitorRule extends AbstractAstVisitorRule
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME| Constructor and Description |
|---|
AbstractSharedAstVisitorRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(org.codenarc.source.SourceCode sourceCode,
java.util.List violations)
Apply this rule to the specified source and return a list of violations (or an empty List)
|
protected void |
applyVisitor(org.codenarc.rule.AstVisitor visitor,
org.codenarc.source.SourceCode sourceCode) |
protected org.codenarc.rule.AstVisitor |
getAstVisitor(org.codenarc.source.SourceCode sourceCode)
Subclasses can override to provide an AstVisitor with SourceCode or AST-specific initialization.
|
protected abstract java.util.List<org.codenarc.rule.Violation> |
getViolations(org.codenarc.rule.AstVisitor astVisitor,
org.codenarc.source.SourceCode sourceCode) |
getApplyToClassNames, getAstVisitor, getAstVisitorClass, getDoNotApplyToClassNames, setApplyToClassNames, setDoNotApplyToClassNames, shouldApplyThisRuleToapplyTo, createViolation, createViolation, createViolation, createViolation, createViolation, createViolationForImport, createViolationForImport, createViolationForImport, getApplyToFileNames, getApplyToFilesMatching, getCompilerPhase, getDescription, getDoNotApplyToFileNames, getDoNotApplyToFilesMatching, getName, getPriority, getViolationMessage, isEnabled, isReady, setApplyToFileNames, setApplyToFilesMatching, setDescription, setDoNotApplyToFileNames, setDoNotApplyToFilesMatching, setEnabled, setName, setPriority, setViolationMessage, toString, validateprotected abstract java.util.List<org.codenarc.rule.Violation> getViolations(org.codenarc.rule.AstVisitor astVisitor,
org.codenarc.source.SourceCode sourceCode)
public void applyTo(org.codenarc.source.SourceCode sourceCode,
java.util.List violations)
AbstractRuleapplyTo in class AbstractAstVisitorRulesourceCode - - the source to apply this rule toviolations - - the List of violations to which new violations from this rule are to be addedprotected org.codenarc.rule.AstVisitor getAstVisitor(org.codenarc.source.SourceCode sourceCode)
protected void applyVisitor(org.codenarc.rule.AstVisitor visitor,
org.codenarc.source.SourceCode sourceCode)