|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.util.BuilderSupport
groovy.util.AntBuilder
org.codehaus.gant.GantBuilder
public class GantBuilder
This class is a sub-class of AntBuilder
to provide extra capabilities. In particular, a
dry-run capability, and things to help support interaction between Gant and the underlying
Project
.
Constructor Summary | |
---|---|
GantBuilder()
Constructor that uses the default project. |
|
GantBuilder(org.apache.tools.ant.Project project)
Constructor that specifies which Project to be associated with. |
Method Summary | |
---|---|
org.apache.tools.ant.BuildLogger |
getLogger()
Accessor for the logger associated with the Project . |
java.lang.Object |
invokeMethod(java.lang.String name,
java.lang.Object arguments)
Invoke a method. |
Methods inherited from class groovy.util.AntBuilder |
---|
buildAttributes, createNode, createNode, createNode, createNode, createProject, doInvokeMethod, getAntProject, getAntXmlContext, getProject, nodeCompleted, setParent, setText |
Methods inherited from class groovy.util.BuilderSupport |
---|
getCurrent, getName, invokeMethod, postNodeCompletion, 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 |
Constructor Detail |
---|
public GantBuilder()
public GantBuilder(org.apache.tools.ant.Project project)
Project
to be associated with.
If execution is from a command line Gant or call from a Groovy script then the class loader for all
objects is a single instance of org.codehaus.groovy.tools.RootLoader
, which already has
Ant and Groovy jars in the classpath. If, however, execution is from an Ant execution via the Gant
Ant Task, then the classloader for the instance is an instance of
org.apache.tools.ant.AntClassLoader
with Ant and Groovy jars on the classpath BUT the
class loader for the Project
instance is a simple java.net.URLClassLoader
and does not have the necessary jars on the classpath. When using Ant, the Ant jar has been loaded
before the Groovy aspects of the classpath have been set up. So we must allow for a specialized
constructor (this one) taking a preprepared Project
to handle this situation.
project
- The Project
to be associated with.Method Detail |
---|
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
invokeMethod
in class groovy.util.BuilderSupport
name
- The name of the method to invoke.arguments
- The parameters to the method call.
public org.apache.tools.ant.BuildLogger getLogger()
Project
.
BuildLogger
.
|
Copyright © 2006–9 The Codehaus. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |