Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`AntBuilder()`
`AntBuilder(org.apache.tools.ant.Project project)`
`AntBuilder(org.apache.tools.ant.Project project, org.apache.tools.ant.Target owningTarget)`
`AntBuilder(org.apache.tools.ant.Task parentTask)`

Method Summary
`protected static Attributes` | `buildAttributes(java.util.Map attributes)`
`protected java.lang.Object` | `createNode(java.lang.Object tagName)`
`protected java.lang.Object` | `createNode(java.lang.Object name, java.lang.Object value)`
`protected java.lang.Object` | `createNode(java.lang.Object name, java.util.Map attributes, java.lang.Object value)`
`protected java.lang.Object` | `createNode(java.lang.Object name, java.util.Map attributes)`
`protected static org.apache.tools.ant.Project` | `createProject()`
`protected java.lang.Object` | `doInvokeMethod(java.lang.String methodName, java.lang.Object name, java.lang.Object args)`
`org.apache.tools.ant.Project` | `getAntProject()`
`org.apache.tools.ant.helper.AntXMLContext` | `getAntXmlContext()`
`org.apache.tools.ant.Project` | `getProject()` # Gets the Ant project in which the tasks are executed
`protected void` | `nodeCompleted(java.lang.Object parent, java.lang.Object node)` Determines, when the ANT Task that is represented by the "node" should perform.
`protected void` | `setParent(java.lang.Object parent, java.lang.Object child)`
`protected void` | `setText(java.lang.Object task, java.lang.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 java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### AntBuilder

    public AntBuilder()

### AntBuilder

    public AntBuilder(org.apache.tools.ant.Project project)

### AntBuilder

    public AntBuilder(org.apache.tools.ant.Project project, org.apache.tools.ant.Target owningTarget)

### AntBuilder

    public AntBuilder(org.apache.tools.ant.Task parentTask)

Method Detail

### buildAttributes

    protected static Attributes buildAttributes(java.util.Map attributes)

### createNode

    protected java.lang.Object createNode(java.lang.Object tagName)

### createNode

    protected java.lang.Object createNode(java.lang.Object name, java.lang.Object value)

### createNode

    protected java.lang.Object createNode(java.lang.Object name, java.util.Map attributes, java.lang.Object value)

### createNode

    protected java.lang.Object createNode(java.lang.Object name, java.util.Map attributes)

### createProject

    protected static org.apache.tools.ant.Project createProject()

### doInvokeMethod

    protected java.lang.Object doInvokeMethod(java.lang.String methodName, java.lang.Object name, java.lang.Object args)

### getAntProject

    public org.apache.tools.ant.Project getAntProject()

### getAntXmlContext

    public org.apache.tools.ant.helper.AntXMLContext getAntXmlContext()

### getProject

    public org.apache.tools.ant.Project getProject()

  # Gets the Ant project in which the tasks are executed
  Returns:
    the project

### nodeCompleted

    protected void nodeCompleted(java.lang.Object parent, java.lang.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(java.lang.Object parent, java.lang.Object child)

### setText

    protected void setText(java.lang.Object task, java.lang.String text)

  Would be nice to retrieve location information (from AST?). In a first time, without info

Groovy Documentation