Groovy 2.2.0

org.codehaus.groovy.control.customizers
[Java] Class ImportCustomizer

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 :

Authors:
Cedric Champeau
Since:
1.8.0


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

ImportCustomizer

public ImportCustomizer()


 
Method Detail

addImport

public ImportCustomizer addImport(String alias, String className)


addImports

public ImportCustomizer addImports(String... imports)


addStarImports

public ImportCustomizer addStarImports(String... packageNames)


addStaticImport

public ImportCustomizer addStaticImport(String className, String fieldName)


addStaticImport

public ImportCustomizer addStaticImport(String alias, String className, String fieldName)


addStaticStars

public ImportCustomizer addStaticStars(String... classNames)


call

@Override
public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)


 

Copyright © 2003-2013 The Codehaus. All rights reserved.