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)
| Modifier and Type | Field and Description |
|---|---|
| private Closure | |
| private Closure | |
| private Closure | |
| private Closure |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | call(final SourceUnit source, final GeneratorContext context, final ClassNode classNode)
Overrides org. Implements org. |
| public void | |
| public void | |
| public void | |
| public void |
| baseNameValidator | back to summary |
|---|---|
| private Closure<Boolean> baseNameValidator | |
| classValidator | back to summary |
|---|---|
| private Closure<Boolean> classValidator | |
| extensionValidator | back to summary |
|---|---|
| private Closure<Boolean> extensionValidator | |
| sourceUnitValidator | back to summary |
|---|---|
| private Closure<Boolean> sourceUnitValidator | |
| SourceAwareCustomizer | back to summary |
|---|---|
| public SourceAwareCustomizer(CompilationCustomizer delegate) | |
| accept | back to summary |
|---|---|
| public boolean accept(String fileName) | |
| acceptBaseName | back to summary |
|---|---|
| public boolean acceptBaseName(String baseName) | |
| acceptClass | back to summary |
|---|---|
| public boolean acceptClass(ClassNode cnode) | |
| acceptExtension | back to summary |
|---|---|
| public boolean acceptExtension(String extension) | |
| acceptSource | back to summary |
|---|---|
| public boolean acceptSource(SourceUnit unit) | |
| call | back to summary |
|---|---|
| public void call(final SourceUnit source, final GeneratorContext context, final ClassNode classNode) throws CompilationFailedException Overrides org. Implements org.
| |
| setBaseNameValidator | back to summary |
|---|---|
| public void setBaseNameValidator(final Closure<Boolean> baseNameValidator) | |
| setClassValidator | back to summary |
|---|---|
| public void setClassValidator(final Closure<Boolean> classValidator) | |
| setExtensionValidator | back to summary |
|---|---|
| public void setExtensionValidator(final Closure<Boolean> extensionValidator) | |
| setSourceUnitValidator | back to summary |
|---|---|
| public void setSourceUnitValidator(final Closure<Boolean> sourceUnitValidator) | |