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(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) |
getPhase
needSortedInput
public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException
call
in class CompilationUnit.PrimaryClassNodeOperation
CompilationFailedException
public ImportCustomizer addImport(String alias, String className)
public ImportCustomizer addStaticImport(String className, String fieldName)
public ImportCustomizer addStaticStars(String... classNames)
public ImportCustomizer addStaticImport(String alias, String className, String fieldName)
public ImportCustomizer addImports(String... imports)
public ImportCustomizer addStarImports(String... packageNames)