|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.control.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(String alias, String className)
|
ImportCustomizer
|
addImports(String... imports)
|
ImportCustomizer
|
addStarImports(String... packageNames)
|
ImportCustomizer
|
addStaticImport(String className, String fieldName)
|
ImportCustomizer
|
addStaticImport(String alias, String className, String fieldName)
|
ImportCustomizer
|
addStaticStars(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(String alias, String className)
public ImportCustomizer addImports(String... imports)
public ImportCustomizer addStarImports(String... packageNames)
public ImportCustomizer addStaticImport(String className, String fieldName)
public ImportCustomizer addStaticImport(String alias, String className, String fieldName)
public ImportCustomizer addStaticStars(String... classNames)
@Override public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)
Copyright © 2003-2013 The Codehaus. All rights reserved.