@SuppressWarnings("unchecked") public class InlinedASTCustomizerFactory extends AbstractFactory implements PostCompletionFactory
This factory lets a user define a compilation customizer without having to define an anonymous inner class.
Here is an example, which only logs the class name during compilation:
inline(phase:'CONVERSION') { source, context, classNode ->
println "visiting $classNode"
}
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
isHandlesNodeChildren() |
|
Object |
newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) |
|
boolean |
onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent) |
|
Object |
postCompleteNode(FactoryBuilderSupport factory, Object parent, Object node) |
Methods inherited from class | Name |
---|---|
class AbstractFactory |
setParent, isLeaf, setChild, onNodeChildren, onNodeCompleted, onFactoryRegistration, onHandleNodeAttributes, isHandlesNodeChildren, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll, newInstance |