Package org.codenarc.rule.imports
Class AbstractImportRule
java.lang.Object
org.codenarc.rule.AbstractRule
org.codenarc.rule.imports.AbstractImportRule
- All Implemented Interfaces:
groovy.lang.GroovyObject
,Rule
- Direct Known Subclasses:
DuplicateImportRule
,MisorderedStaticImportsRule
,NoWildcardImportsRule
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
eachImportLine
(SourceCode sourceCode, groovy.lang.Closure closure) protected int
findLineNumberOfFirstClassDeclaration
(SourceCode sourceCode) groovy.lang.MetaClass
getProperty
(String property) invokeMethod
(String method, Object arguments) void
setMetaClass
(groovy.lang.MetaClass mc) void
setProperty
(String property, Object value) Methods inherited from class org.codenarc.rule.AbstractRule
applyTo, applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getApplyToFileNames, getApplyToFilesMatching, getCompilerPhase, getDescription, getDoNotApplyToFileNames, getDoNotApplyToFilesMatching, getName, getPriority, getViolationMessage, isEnabled, isReady, setApplyToFileNames, setApplyToFilesMatching, setDescription, setDoNotApplyToFileNames, setDoNotApplyToFilesMatching, setEnabled, setName, setPriority, setViolationMessage, toString, validate
-
Field Details
-
NON_STATIC_IMPORT_PATTERN
- See Also:
-
STATIC_IMPORT_PATTERN
- See Also:
-
-
Constructor Details
-
AbstractImportRule
public AbstractImportRule()
-
-
Method Details
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc) - Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
findLineNumberOfFirstClassDeclaration
-
eachImportLine
-