Groovy 2.2.1

groovy.util
[Java] Class AntBuilder

java.lang.Object
  groovy.lang.GroovyObjectSupport
      groovy.util.BuilderSupport
          groovy.util.AntBuilder

public class AntBuilder
extends BuilderSupport

Allows Ant tasks to be used with a Groovy builder-style markup. Requires that {{ant.jar}} is on your classpath which will happen automatically if you are using the Groovy distribution but will be up to you to organize if you are embedding Groovy. If you wish to use the optional tasks you will need to add one or more additional jars from the ant distribution to your classpath - see the library dependencies for more details.

Authors:
James Strachan
Dierk Koenig (dk)
Marc Guillemot
Paul King


Constructor Summary
AntBuilder()

AntBuilder(Project project)

AntBuilder(Project project, Target owningTarget)

AntBuilder(Task parentTask)

 
Method Summary
protected static Attributes buildAttributes(Map attributes)

protected Object createNode(Object tagName)

protected Object createNode(Object name, Object value)

protected Object createNode(Object name, Map attributes, Object value)

protected Object createNode(Object name, Map attributes)

protected static Project createProject()

protected Object doInvokeMethod(String methodName, Object name, Object args)

Project getAntProject()

AntXMLContext getAntXmlContext()

Project getProject()

# Gets the Ant project in which the tasks are executed

boolean isSaveStreams()

protected void nodeCompleted(Object parent, Object node)

Determines, when the ANT Task that is represented by the "node" should perform.

protected void setParent(Object parent, Object child)

void setSaveStreams(boolean saveStreams)

protected void setText(Object task, String text)

Would be nice to retrieve location information (from AST?).

 
Methods inherited from class BuilderSupport
createNode, createNode, createNode, createNode, doInvokeMethod, getCurrent, getName, invokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate, setCurrent, setParent
 
Methods inherited from class GroovyObjectSupport
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

AntBuilder

public AntBuilder()


AntBuilder

public AntBuilder(Project project)


AntBuilder

public AntBuilder(Project project, Target owningTarget)


AntBuilder

public AntBuilder(Task parentTask)


 
Method Detail

buildAttributes

protected static Attributes buildAttributes(Map attributes)


createNode

protected Object createNode(Object tagName)


createNode

protected Object createNode(Object name, Object value)


createNode

protected Object createNode(Object name, Map attributes, Object value)


createNode

protected Object createNode(Object name, Map attributes)


createProject

protected static Project createProject()


doInvokeMethod

protected Object doInvokeMethod(String methodName, Object name, Object args)


getAntProject

public Project getAntProject()


getAntXmlContext

public AntXMLContext getAntXmlContext()


getProject

public Project getProject()
# Gets the Ant project in which the tasks are executed
Returns:
the project


isSaveStreams

public boolean isSaveStreams()


nodeCompleted

protected void nodeCompleted(Object parent, Object node)
Determines, when the ANT Task that is represented by the "node" should perform. Node must be an ANT Task or no "perform" is called. If node is an ANT Task, it performs right after complete construction. If node is nested in a TaskContainer, calling "perform" is delegated to that TaskContainer.
Parameters:
parent - note: null when node is root
node - the node that now has all its children applied


setParent

protected void setParent(Object parent, Object child)


setSaveStreams

public void setSaveStreams(boolean saveStreams)


setText

protected void setText(Object task, String text)
Would be nice to retrieve location information (from AST?). In a first time, without info


 

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