- org.codehaus.groovy.control.customizers.SourceAwareCustomizer
-
A base class for customizers which only have to be applied on specific source units.
This is for example useful if you want a customizer to be applied only for files
matching some extensions.
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)
- Since:
- 2.1.0
- Authors:
- Cedric Champeau
-
-
Methods Summary
-
Inherited Methods Summary
Inherited Methods
Methods inherited from class |
Name |
class DelegatingCustomizer |
call |
class CompilationCustomizer |
getPhase |
class org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation |
org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#call(org.codehaus.groovy.control.SourceUnit, org.codehaus.groovy.classgen.GeneratorContext, org.codehaus.groovy.ast.ClassNode), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#needSortedInput(), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#wait(), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#wait(long, int), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#wait(long), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#equals(java.lang.Object), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#toString(), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#hashCode(), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#getClass(), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#notify(), org.codehaus.groovy.control.CompilationUnit$PrimaryClassNodeOperation#notifyAll() |
-
-
Method Detail
-
public boolean accept(String fileName)
-
public boolean acceptBaseName(String baseName)
-
public boolean acceptExtension(String extension)
-
public boolean acceptSource(org.codehaus.groovy.control.SourceUnit unit)
-
public void setExtensionValidator(Closure<Boolean> extensionValidator)
-
public void setSourceUnitValidator(Closure<Boolean> sourceUnitValidator)
Copyright © 2003-2018 The Apache Software Foundation. All rights reserved.