|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.org.codenarc.util.ImportUtil
class ImportUtil
Contains static utility methods and constants related to Import statements.
This is an internal class and its API is subject to change.Method Summary | |
---|---|
static List
|
getImportsSortedByLineNumber(def sourceCode)
|
static List
|
getNonStaticImportsSortedByLineNumber(def sourceCode)
|
static String
|
packageNameForImport(org.codehaus.groovy.ast.ImportNode importNode)
Return the package name for the specified import statement or else an empty String |
static Map
|
sourceLineAndNumberForImport(SourceCode sourceCode, String className, String alias)
Return the source line and line number for the specified import class name and alias |
static Map
|
sourceLineAndNumberForImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
Return the source line and line number for the specified import |
static Map
|
sourceLineAndNumberForStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
Return the source line and line number for the specified import class name and alias |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
static List getImportsSortedByLineNumber(def sourceCode)
static List getNonStaticImportsSortedByLineNumber(def sourceCode)
static String packageNameForImport(org.codehaus.groovy.ast.ImportNode importNode)
importNode
- - the ImportNode for the import
static Map sourceLineAndNumberForImport(SourceCode sourceCode, String className, String alias)
sourceCode
- - the SourceCode being processedimportNode
- - the ImportNode representing the import
static Map sourceLineAndNumberForImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
sourceCode
- - the SourceCode being processedimportNode
- - the ImportNode representing the import
static Map sourceLineAndNumberForStarImport(SourceCode sourceCode, org.codehaus.groovy.ast.ImportNode importNode)
sourceCode
- - the SourceCode being processedimportNode
- - the ImportNode representing the import
Groovy Documentation