| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.CallTarget
public class CallTarget
Call another target in the same project.
    <target name="foo">
      <antcall target="bar">
        <param name="property1" value="aaaaa" />
        <param name="foo" value="baz" />
       </antcall>
    </target>
    <target name="bar" depends="init">
      <echo message="prop is ${property1} ${foo}" />
    </target>
 
 This only works as expected if neither property1 nor foo are defined in the project itself.
| Field Summary | 
|---|
| Fields inherited from class org.apache.tools.ant.Task | 
|---|
| target, taskName, taskType, wrapper | 
| Fields inherited from class org.apache.tools.ant.ProjectComponent | 
|---|
| description, location, project | 
| Constructor Summary | |
|---|---|
| CallTarget() | |
| Method Summary | |
|---|---|
|  void | addConfiguredTarget(Ant.TargetElement t)Add a target to the list of targets to invoke. | 
|  void | addPropertyset(PropertySet ps)Set of properties to pass to the new project. | 
|  void | addReference(Ant.Reference r)Reference element identifying a data type to carry over to the invoked target. | 
|  Property | createParam()Create a new Property to pass to the invoked target(s). | 
|  void | execute()Delegate the work to the ant task instance, after setting it up. | 
|  void | handleErrorFlush(java.lang.String output)Handle error output. | 
|  void | handleErrorOutput(java.lang.String output)Handle error output. | 
|  void | handleFlush(java.lang.String output)Handles output. | 
|  int | handleInput(byte[] buffer,
            int offset,
            int length)Handles input. | 
|  void | handleOutput(java.lang.String output)Handles output. | 
|  void | init()Initialize this task by creating new instance of the ant task and configuring it by calling its own init method. | 
|  void | setInheritAll(boolean inherit)If true, pass all properties to the new Ant project. | 
|  void | setInheritRefs(boolean inheritRefs)If true, pass all references to the new Ant project. | 
|  void | setTarget(java.lang.String target)Set target to execute. | 
| Methods inherited from class org.apache.tools.ant.Task | 
|---|
| bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType | 
| Methods inherited from class org.apache.tools.ant.ProjectComponent | 
|---|
| clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public CallTarget()
| Method Detail | 
|---|
public void setInheritAll(boolean inherit)
inherit - boolean flag.public void setInheritRefs(boolean inheritRefs)
inheritRefs - boolean flag.public void init()
init in class Task
public void execute()
             throws BuildException
execute in class TaskBuildException - on validation failure or if the target didn't
 execute.public Property createParam()
Property object.public void addReference(Ant.Reference r)
r - the specified Ant.Reference.public void addPropertyset(PropertySet ps)
ps - the PropertySet to pass.public void setTarget(java.lang.String target)
target - the name of the target to execute.public void addConfiguredTarget(Ant.TargetElement t)
t - Ant.TargetElement representing the target.public void handleOutput(java.lang.String output)
handleOutput in class Taskoutput - The string output to output.Task.handleOutput(String)
public int handleInput(byte[] buffer,
                       int offset,
                       int length)
                throws java.io.IOException
handleInput in class Taskbuffer - the buffer into which data is to be read.offset - the offset into the buffer at which data is stored.length - the amount of data to read.
java.io.IOException - if the data cannot be read.Task.handleInput(byte[], int, int)public void handleFlush(java.lang.String output)
handleFlush in class Taskoutput - The string to output.Task.handleFlush(String)public void handleErrorOutput(java.lang.String output)
handleErrorOutput in class Taskoutput - The string to output.Task.handleErrorOutput(String)public void handleErrorFlush(java.lang.String output)
handleErrorFlush in class Taskoutput - The string to output.Task.handleErrorFlush(String)| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||