Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » [javadoc | source]
org.apache.tools.ant.taskdefs
public class: CallTarget [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.CallTarget

All Implemented Interfaces:
    Cloneable

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.

Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Method from org.apache.tools.ant.taskdefs.CallTarget Summary:
addConfiguredTarget,   addPropertyset,   addReference,   createParam,   execute,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   setInheritAll,   setInheritRefs,   setTarget
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.CallTarget Detail:
 public  void addConfiguredTarget(Ant.TargetElement t) 
    Add a target to the list of targets to invoke.
 public  void addPropertyset(PropertySet ps) 
    Set of properties to pass to the new project.
 public  void addReference(Ant.Reference r) 
    Reference element identifying a data type to carry over to the invoked target.
 public Property createParam() 
    Create a new Property to pass to the invoked target(s).
 public  void execute() throws BuildException 
    Delegate the work to the ant task instance, after setting it up.
 public  void handleErrorFlush(String output) 
    Handle error output. Send it the the new project if is present, otherwise call the super class.
 public  void handleErrorOutput(String output) 
    Handle error output. Send it the the new project if is present, otherwise call the super class.
 public  void handleFlush(String output) 
    Handles output. Send it the the new project if is present, otherwise call the super class.
 public int handleInput(byte[] buffer,
    int offset,
    int length) throws IOException 
    Handles input. Deleate to the created project, if present, otherwise call the super class.
 public  void handleOutput(String output) 
    Handles output. Send it the the new project if is present, otherwise call the super class.
 public  void init() 
    Initialize this task by creating new instance of the ant task and configuring it by calling its own init method.
 public  void setInheritAll(boolean inherit) 
    If true, pass all properties to the new Ant project. Defaults to true.
 public  void setInheritRefs(boolean inheritRefs) 
    If true, pass all references to the new Ant project. Defaults to false.
 public  void setTarget(String target) 
    Set target to execute.