|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CompilationUnit.PrimaryClassNodeOperation org.codehaus.groovy.control.customizers.CompilationCustomizer org.codehaus.groovy.control.customizers.ImportCustomizer
public class ImportCustomizer extends CompilationCustomizer
This compilation customizer allows addiing various types of imports to the compilation unit. Supports adding :
Constructor Summary | |
ImportCustomizer()
|
Method Summary | |
---|---|
ImportCustomizer
|
addImport(java.lang.String alias, java.lang.String className)
|
ImportCustomizer
|
addImports(java.lang.String... imports)
|
ImportCustomizer
|
addStarImports(java.lang.String... packageNames)
|
ImportCustomizer
|
addStaticImport(java.lang.String className, java.lang.String fieldName)
|
ImportCustomizer
|
addStaticImport(java.lang.String alias, java.lang.String className, java.lang.String fieldName)
|
ImportCustomizer
|
addStaticStars(java.lang.String... classNames)
|
void
|
call(SourceUnit source, GeneratorContext context, ClassNode classNode)
|
Methods inherited from class CompilationCustomizer | |
---|---|
getPhase |
Constructor Detail |
---|
public ImportCustomizer()
Method Detail |
---|
public ImportCustomizer addImport(java.lang.String alias, java.lang.String className)
public ImportCustomizer addImports(java.lang.String... imports)
public ImportCustomizer addStarImports(java.lang.String... packageNames)
public ImportCustomizer addStaticImport(java.lang.String className, java.lang.String fieldName)
public ImportCustomizer addStaticImport(java.lang.String alias, java.lang.String className, java.lang.String fieldName)
public ImportCustomizer addStaticStars(java.lang.String... classNames)
@Override public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)
Groovy Documentation