org.codenarc.rule.imports
Class AbstractImportRule

java.lang.Object
  extended by org.codenarc.rule.AbstractRule
      extended by org.codenarc.rule.imports.AbstractImportRule
All Implemented Interfaces:
groovy.lang.GroovyObject, Rule
Direct Known Subclasses:
DuplicateImportRule, MisorderedStaticImportsRule

public abstract class AbstractImportRule
extends AbstractRule
implements groovy.lang.GroovyObject


Field Summary
static Object NON_STATIC_IMPORT_PATTERN
           
static Object STATIC_IMPORT_PATTERN
           
 
Constructor Summary
AbstractImportRule()
           
 
Method Summary
protected  void eachImportLine(SourceCode sourceCode, groovy.lang.Closure closure)
           
protected  Object findLineNumberOfFirstClassDeclaration(SourceCode sourceCode)
           
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 Object 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, createViolation, createViolation, createViolation, createViolationForImport, createViolationForImport, createViolationForImport, getApplyToFileNames, getApplyToFilesMatching, getDescription, getDoNotApplyToFileNames, getDoNotApplyToFilesMatching, getName, getPriority, getViolationMessage, isEnabled, isReady, setApplyToFileNames, setApplyToFilesMatching, setDescription, setDoNotApplyToFileNames, setDoNotApplyToFilesMatching, setEnabled, setName, setPriority, setViolationMessage, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NON_STATIC_IMPORT_PATTERN

public static Object NON_STATIC_IMPORT_PATTERN

STATIC_IMPORT_PATTERN

public static Object STATIC_IMPORT_PATTERN
Constructor Detail

AbstractImportRule

public AbstractImportRule()
Method Detail

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject

findLineNumberOfFirstClassDeclaration

protected Object findLineNumberOfFirstClassDeclaration(SourceCode sourceCode)

eachImportLine

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


Copyright © 2012. All Rights Reserved.