public class SourceAwareCustomizer extends DelegatingCustomizer
For convenience, this class implements several methods that you may extend to customize
the behaviour of this utility. For example, if you want to apply a customizer only
for classes matching the '.foo' file extension, then you only have to override the
acceptExtension(String) method:
return "foo".equals(extension)delegate| Constructor and Description |
|---|
SourceAwareCustomizer(CompilationCustomizer delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(String fileName) |
boolean |
acceptBaseName(String baseName) |
boolean |
acceptClass(ClassNode cnode) |
boolean |
acceptExtension(String extension) |
boolean |
acceptSource(SourceUnit unit) |
void |
call(SourceUnit source,
GeneratorContext context,
ClassNode classNode) |
void |
setBaseNameValidator(Closure<Boolean> baseNameValidator) |
void |
setClassValidator(Closure<Boolean> classValidator) |
void |
setExtensionValidator(Closure<Boolean> extensionValidator) |
void |
setSourceUnitValidator(Closure<Boolean> sourceUnitValidator) |
getPhaseneedSortedInputpublic SourceAwareCustomizer(CompilationCustomizer delegate)
public void call(SourceUnit source, GeneratorContext context, ClassNode classNode) throws CompilationFailedException
call in class DelegatingCustomizerCompilationFailedExceptionpublic boolean accept(String fileName)
public boolean acceptClass(ClassNode cnode)
public boolean acceptSource(SourceUnit unit)
public boolean acceptExtension(String extension)
public boolean acceptBaseName(String baseName)