|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.Target
Class to implement a target object with required parameters.
Constructor Summary | |
Target()
Sole constructor. |
Method Summary | |
void |
addDataType(RuntimeConfigurable r)
Adds the wrapper for a data type element to this target. |
void |
addDependency(java.lang.String dependency)
Adds a dependency to this target. |
void |
addTask(Task task)
Adds a task to this target. |
void |
execute()
Executes the target if the "if" and "unless" conditions are satisfied. |
java.util.Enumeration |
getDependencies()
Returns an enumeration of the dependencies of this target. |
java.lang.String |
getDescription()
Returns the description of this target. |
java.lang.String |
getName()
Returns the name of this target. |
Project |
getProject()
Returns the project this target belongs to. |
Task[] |
getTasks()
Returns the current set of tasks to be executed by this target. |
void |
performTasks()
Performs the tasks within this target (if the conditions are met), firing target started/target finished messages around a call to execute. |
void |
setDepends(java.lang.String depS)
Sets the list of targets this target is dependent on. |
void |
setDescription(java.lang.String description)
Sets the description of this target. |
void |
setIf(java.lang.String property)
Sets the "if" condition to test on execution. |
void |
setName(java.lang.String name)
Sets the name of this target. |
void |
setProject(Project project)
Sets the project this target belongs to. |
void |
setUnless(java.lang.String property)
Sets the "unless" condition to test on execution. |
java.lang.String |
toString()
Returns the name of this target. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Target()
Method Detail |
public void setProject(Project project)
project
- The project this target belongs to.
Must not be null
.public Project getProject()
null
if
the project has not been set yet.public void setDepends(java.lang.String depS)
depS
- A comma-separated list of targets this target
depends on. Must not be null
.public void setName(java.lang.String name)
name
- The name of this target. Should not be null
.public java.lang.String getName()
null
if the
name has not been set yet.public void addTask(Task task)
addTask
in interface TaskContainer
task
- The task to be added. Must not be null
.public void addDataType(RuntimeConfigurable r)
r
- The wrapper for the data type element to be added.
Must not be null
.public Task[] getTasks()
public void addDependency(java.lang.String dependency)
dependency
- The name of a target this target is dependent on.
Must not be null
.public java.util.Enumeration getDependencies()
public void setIf(java.lang.String property)
foo
has value bar
, setting
the "if" condition to ${foo}_x
will mean that the
task will only execute if property bar_x
is set.
property
- The property condition to test on execution.
May be null
, in which case
no "if" test is performed.public void setUnless(java.lang.String property)
foo
has value bar
, setting
the "unless" condition to ${foo}_x
will mean that the
task will only execute if property bar_x
isn't set.
property
- The property condition to test on execution.
May be null
, in which case
no "unless" test is performed.public void setDescription(java.lang.String description)
description
- The description for this target.
May be null
, indicating that no
description is available.public java.lang.String getDescription()
null
if no
description is available.public java.lang.String toString()
null
if the
name has not been set yet.public void execute() throws BuildException
BuildException
- if any of the tasks fail or if a data type
configuration fails.performTasks()
,
setIf(String)
,
setUnless(String)
public final void performTasks()
execute()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |