public class ImportCustomizer extends CompilationCustomizer
addImport(String)
, addImport(String, String)
or addImports(String...)
addStarImport(String)
or addStarImports(String...)
addStaticImport(String, String)
or addStaticImport(String, String, String)
addStaticStar(String)
or addStaticStars(String...)
Constructor and Description |
---|
ImportCustomizer() |
Modifier and Type | Method and Description |
---|---|
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) |
getPhase
needSortedInput
public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException
call
in class CompilationUnit.PrimaryClassNodeOperation
CompilationFailedException
public ImportCustomizer addImport(java.lang.String alias, java.lang.String className)
public ImportCustomizer addStaticImport(java.lang.String className, java.lang.String fieldName)
public ImportCustomizer addStaticStars(java.lang.String... classNames)
public ImportCustomizer addStaticImport(java.lang.String alias, java.lang.String className, java.lang.String fieldName)
public ImportCustomizer addImports(java.lang.String... imports)
public ImportCustomizer addStarImports(java.lang.String... packageNames)