Groovy 2.2.1

org.codehaus.groovy.control.customizers.builder
[Java] Class InlinedASTCustomizerFactory

java.lang.Object
  groovy.util.AbstractFactory
      org.codehaus.groovy.control.customizers.builder.InlinedASTCustomizerFactory
All Implemented Interfaces:
PostCompletionFactory

@SuppressWarnings("unchecked")
public class InlinedASTCustomizerFactory
extends AbstractFactory

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"
 }
 
Authors:
Cedric Champeau
Since:
2.1.0


Method Summary
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 AbstractFactory
isHandlesNodeChildren, isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeChildren, onNodeCompleted, setChild, setParent
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

isHandlesNodeChildren

@Override
public boolean isHandlesNodeChildren()


newInstance

public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)


onNodeChildren

@Override
public boolean onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)


postCompleteNode

public Object postCompleteNode(FactoryBuilderSupport factory, Object parent, Object node)


 

Copyright © 2003-2013 The Codehaus. All rights reserved.