Package: java.org.codenarc.rule

## [Java] Class AbstractSharedAstVisitorRule

- java.org.codenarc.rule.AbstractSharedAstVisitorRule

- Abstract superclass for Rules that use a single, shared AstVisitor across all ClassNodes in a source (file).

  Authors:
    Chris Mair

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractAstVisitorRule` | `CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `applyTo(SourceCode sourceCode, List violations)`
    `` | `protected void` | `applyVisitor(AstVisitor visitor, SourceCode sourceCode)`
    `` | `protected AstVisitor` | `getAstVisitor(SourceCode sourceCode)` Subclasses can override to provide an AstVisitor with SourceCode or AST-specific initialization.
    `` | `protected List<Violation>` | `getViolations(AstVisitor astVisitor, SourceCode sourceCode)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractAstVisitorRule` | `applyTo, getApplyToClassNames, getAstVisitor, getAstVisitorClass, getDoNotApplyToClassNames, setApplyToClassNames, setDoNotApplyToClassNames, shouldApplyThisRuleTo`

    `class AbstractRule`

    `applyTo, applyTo, 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, validate`

- - ### Method Detail

    - #### @Override public void applyTo(SourceCode sourceCode, List violations)

    - #### protected void applyVisitor(AstVisitor visitor, SourceCode sourceCode)

    - #### protected AstVisitor getAstVisitor(SourceCode sourceCode)

      Subclasses can override to provide an AstVisitor with SourceCode or AST-specific initialization.

    - #### protected List<Violation> getViolations(AstVisitor astVisitor, SourceCode sourceCode)