groovy.util
Class AntBuilder

java.lang.Object
  extended bygroovy.lang.GroovyObjectSupport
      extended bygroovy.util.BuilderSupport
          extended bygroovy.util.AntBuilder
All Implemented Interfaces:
GroovyObject

public class AntBuilder
extends BuilderSupport

Allows Ant tasks to be used with GroovyMarkup

Version:
$Revision: 1.9 $
Author:
James Strachan, changes by Dierk Koenig (dk)

Field Summary
private static java.lang.Class[] addTaskParamTypes
           
private  java.util.logging.Logger log
           
private  Project project
           
 
Fields inherited from class groovy.util.BuilderSupport
 
Fields inherited from class groovy.lang.GroovyObjectSupport
 
Constructor Summary
AntBuilder()
           
AntBuilder(Project project)
           
 
Method Summary
protected  java.lang.Object createDataType(java.lang.reflect.Constructor ctor, java.lang.Object[] args, java.lang.String name, java.lang.String argDescription)
           
protected  java.lang.Object createDataType(java.lang.String name)
           
protected  java.lang.Object createNestedObject(java.lang.Object object, java.lang.String name)
          Creates a nested object of the given object with the specified name
protected  java.lang.Object createNode(java.lang.Object tagName)
           
protected  java.lang.Object createNode(java.lang.Object name, java.util.Map attributes)
           
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.lang.Object value)
           
protected  Project createProject()
           
protected  Task createTask(java.lang.String taskName)
           
protected  Task createTask(java.lang.String taskName, java.lang.Class taskType)
           
protected  java.lang.reflect.Method getAccessibleMethod(java.lang.Class theClass, java.lang.String name, java.lang.Class[] paramTypes)
           
 Project getAntProject()
           
protected  Task getParentTask()
           
protected  Project getProject()
           
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 setBeanProperties(java.lang.Object object, java.util.Map map)
           
protected  void setBeanProperty(java.lang.Object object, java.lang.String name, java.lang.Object value)
           
protected  void setParent(java.lang.Object parent, java.lang.Object child)
           
protected  void setText(java.lang.Object task, java.lang.String text)
           
 
Methods inherited from class groovy.util.BuilderSupport
doInvokeMethod, getCurrent, getName, invokeMethod, setClosureDelegate, setCurrent
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, getProperty, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addTaskParamTypes

private static final java.lang.Class[] addTaskParamTypes

log

private java.util.logging.Logger log

project

private Project project
Constructor Detail

AntBuilder

public AntBuilder()

AntBuilder

public AntBuilder(Project project)
Method Detail

getProject

protected Project getProject()

createProject

protected Project createProject()
Returns:
Factory method to create new Project instances

setParent

protected void setParent(java.lang.Object parent,
                         java.lang.Object child)
Specified by:
setParent in class BuilderSupport

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 contstruction. If node is nested in a TaskContainer, calling "perform" is delegated to that TaskContainer.

Overrides:
nodeCompleted in class BuilderSupport
Parameters:
parent - note: null when node is root
node - the node that now has all its children applied

createNode

protected java.lang.Object createNode(java.lang.Object tagName)
Specified by:
createNode in class BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object name,
                                      java.lang.Object value)
Specified by:
createNode in class BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object name,
                                      java.util.Map attributes,
                                      java.lang.Object value)
Specified by:
createNode in class BuilderSupport

createNode

protected java.lang.Object createNode(java.lang.Object name,
                                      java.util.Map attributes)
Specified by:
createNode in class BuilderSupport

setText

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

getAccessibleMethod

protected java.lang.reflect.Method getAccessibleMethod(java.lang.Class theClass,
                                                       java.lang.String name,
                                                       java.lang.Class[] paramTypes)

getAntProject

public Project getAntProject()

setBeanProperties

protected void setBeanProperties(java.lang.Object object,
                                 java.util.Map map)

setBeanProperty

protected void setBeanProperty(java.lang.Object object,
                               java.lang.String name,
                               java.lang.Object value)

createNestedObject

protected java.lang.Object createNestedObject(java.lang.Object object,
                                              java.lang.String name)
Creates a nested object of the given object with the specified name


createDataType

protected java.lang.Object createDataType(java.lang.String name)

createDataType

protected java.lang.Object createDataType(java.lang.reflect.Constructor ctor,
                                          java.lang.Object[] args,
                                          java.lang.String name,
                                          java.lang.String argDescription)
Parameters:
ctor - a constructor to use creating the object
args - the arguments to pass to the constructor
name - the name of the data type being created
argDescription - a human readable description of the args passed
Returns:
an object create with the given constructor and args.

createTask

protected Task createTask(java.lang.String taskName)
Parameters:
taskName - the name of the task to create
Returns:
a newly created task

createTask

protected Task createTask(java.lang.String taskName,
                          java.lang.Class taskType)

getParentTask

protected Task getParentTask()


Copyright © 2003-2005 The Codehaus. All Rights Reserved.