| org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.CallTarget
CallTarget | public class CallTarget extends Task (Code) | | 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.
since: Ant 1.2 |
Method Summary | |
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() Delegate the work to the ant task instance, after setting it up. | public void | handleErrorFlush(String output) Handle error output. | public void | handleErrorOutput(String output) Handle error output. | public void | handleFlush(String output) Handles output. | public int | handleInput(byte[] buffer, int offset, int length) Handles input.
Deleate to the created project, if present, otherwise
call the super class.
Parameters: buffer - the buffer into which data is to be read. Parameters: offset - the offset into the buffer at which data is stored. Parameters: length - the amount of data to read. | public void | handleOutput(String output) Handles output. | 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. | public void | setInheritRefs(boolean inheritRefs) If true, pass all references to the new Ant project. | public void | setTarget(String target) Set target to execute. |
addConfiguredTarget | public void addConfiguredTarget(Ant.TargetElement t)(Code) | | Add a target to the list of targets to invoke.
Parameters: t - Ant.TargetElement representing the target. since: Ant 1.6.3 |
addPropertyset | public void addPropertyset(PropertySet ps)(Code) | | Set of properties to pass to the new project.
Parameters: ps - the PropertySet to pass. since: Ant 1.6 |
addReference | public void addReference(Ant.Reference r)(Code) | | Reference element identifying a data type to carry
over to the invoked target.
Parameters: r - the specified Ant.Reference . since: Ant 1.5 |
createParam | public Property createParam()(Code) | | Create a new Property to pass to the invoked target(s).
a Property object. |
execute | public void execute() throws BuildException(Code) | | Delegate the work to the ant task instance, after setting it up.
throws: BuildException - on validation failure or if the target didn'texecute. |
handleErrorFlush | public void handleErrorFlush(String output)(Code) | | Handle error output.
Send it the the new project if is present, otherwise
call the super class.
Parameters: output - The string to output. See Also: Task.handleErrorFlush(String) since: Ant 1.5.2 |
handleErrorOutput | public void handleErrorOutput(String output)(Code) | | Handle error output.
Send it the the new project if is present, otherwise
call the super class.
Parameters: output - The string to output. See Also: Task.handleErrorOutput(String) since: Ant 1.5 |
handleFlush | public void handleFlush(String output)(Code) | | Handles output.
Send it the the new project if is present, otherwise
call the super class.
Parameters: output - The string to output. See Also: Task.handleFlush(String) since: Ant 1.5.2 |
handleInput | public int handleInput(byte[] buffer, int offset, int length) throws IOException(Code) | | Handles input.
Deleate to the created project, if present, otherwise
call the super class.
Parameters: buffer - the buffer into which data is to be read. Parameters: offset - the offset into the buffer at which data is stored. Parameters: length - the amount of data to read. the number of bytes read. exception: IOException - if the data cannot be read. See Also: Task.handleInput(byte[]intint) since: Ant 1.6 |
handleOutput | public void handleOutput(String output)(Code) | | Handles output.
Send it the the new project if is present, otherwise
call the super class.
Parameters: output - The string output to output. See Also: Task.handleOutput(String) since: Ant 1.5 |
init | public void init()(Code) | | Initialize this task by creating new instance of the ant task and
configuring it by calling its own init method.
|
setInheritAll | public void setInheritAll(boolean inherit)(Code) | | If true, pass all properties to the new Ant project.
Defaults to true.
Parameters: inherit - boolean flag. |
setInheritRefs | public void setInheritRefs(boolean inheritRefs)(Code) | | If true, pass all references to the new Ant project.
Defaults to false.
Parameters: inheritRefs - boolean flag. |
setTarget | public void setTarget(String target)(Code) | | Set target to execute.
Parameters: target - the name of the target to execute. |
|
|