Package: groovy.org.codenarc.rule.imports

## [Groovy] Class AbstractImportRule

- groovy.org.codenarc.rule.imports.AbstractImportRule

- Abstract class with common functionalities for import-related rules.

  Authors:
    Erik Pragt
    Marcin Erdmann

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static def` | `NON_STATIC_IMPORT_PATTERN` |
    `static def` | `STATIC_IMPORT_PATTERN` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `eachImportLine(SourceCode sourceCode, groovy.lang.Closure closure)`
    `` | `protected def` | `findLineNumberOfFirstClassDeclaration(SourceCode sourceCode)` Optimization: Stop checking lines for imports once a class/interface has been declared

- - ### Field Detail

    - #### public static final def NON_STATIC_IMPORT_PATTERN

    - #### public static final def STATIC_IMPORT_PATTERN

  - ### Method Detail

    - #### protected void eachImportLine(SourceCode sourceCode, groovy.lang.Closure closure)

    - #### protected def findLineNumberOfFirstClassDeclaration(SourceCode sourceCode)

      Optimization: Stop checking lines for imports once a class/interface has been declared