Class ImportUtil
java.lang.Object
org.codenarc.util.ImportUtil
- All Implemented Interfaces:
groovy.lang.GroovyObject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ListgetImportsSortedByLineNumber(SourceCode sourceCode) groovy.lang.MetaClassstatic ListgetNonStaticImportsSortedByLineNumber(SourceCode sourceCode) getProperty(String property) invokeMethod(String method, Object arguments) static StringpackageNameForImport(org.codehaus.groovy.ast.ImportNode importNode) voidsetMetaClass(groovy.lang.MetaClass mc) voidsetProperty(String property, Object value) static MapsourceLineAndNumberForImport(SourceCode sourceCode, String className, String alias) static MapsourceLineAndNumberForImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode) static MapsourceLineAndNumberForNonStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode) static MapsourceLineAndNumberForStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
-
Constructor Details
-
ImportUtil
public ImportUtil()
-
-
Method Details
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()- Specified by:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc) - Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
invokeMethod
-
getProperty
-
setProperty
-
packageNameForImport
-
sourceLineAndNumberForImport
public static Map sourceLineAndNumberForImport(SourceCode sourceCode, String className, String alias) -
sourceLineAndNumberForStarImport
public static Map sourceLineAndNumberForStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode) -
sourceLineAndNumberForNonStarImport
public static Map sourceLineAndNumberForNonStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode) -
sourceLineAndNumberForImport
public static Map sourceLineAndNumberForImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode) -
getImportsSortedByLineNumber
-
getNonStaticImportsSortedByLineNumber
-