|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task
Base class for all tasks.
Use Project.createTask
to create a new Task.
Field Summary | |
protected java.lang.String |
description
|
protected Location |
location
|
protected Target |
target
|
protected java.lang.String |
taskName
|
protected java.lang.String |
taskType
|
protected RuntimeConfigurable |
wrapper
|
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
Task()
|
Method Summary | |
void |
execute()
Called by the project to let the task do it's work. |
java.lang.String |
getDescription()
|
Location |
getLocation()
Returns the file location where this task was defined. |
Target |
getOwningTarget()
Get the Target to which this task belongs |
RuntimeConfigurable |
getRuntimeConfigurableWrapper()
Returns the wrapper class for runtime configuration. |
java.lang.String |
getTaskName()
Get the name to use in logging messages. |
protected void |
handleErrorOutput(java.lang.String line)
|
protected void |
handleOutput(java.lang.String line)
|
void |
init()
Called by the project to let the task initialize properly. |
void |
log(java.lang.String msg)
Log a message with the default (INFO) priority. |
void |
log(java.lang.String msg,
int msgLevel)
Log a mesage with the give priority. |
void |
maybeConfigure()
Configure this task - if it hasn't been done already. |
void |
perform()
Perform this task |
void |
setDescription(java.lang.String desc)
Sets a description of the current action. |
void |
setLocation(Location location)
Sets the file location where this task was defined. |
void |
setOwningTarget(Target target)
Sets the target object of this task. |
protected void |
setRuntimeConfigurableWrapper(RuntimeConfigurable wrapper)
|
void |
setTaskName(java.lang.String name)
Set the name to use in logging messages. |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Target target
protected java.lang.String description
protected Location location
protected java.lang.String taskName
protected java.lang.String taskType
protected RuntimeConfigurable wrapper
Constructor Detail |
public Task()
Method Detail |
public void setOwningTarget(Target target)
target
- Target in whose scope this task belongs.public Target getOwningTarget()
public void setTaskName(java.lang.String name)
name
- the name to use in logging messages.public java.lang.String getTaskName()
public void setDescription(java.lang.String desc)
public java.lang.String getDescription()
public void init() throws BuildException
BuildException
- if someting goes wrong with the buildpublic void execute() throws BuildException
BuildException
- if someting goes wrong with the buildpublic Location getLocation()
public void setLocation(Location location)
public RuntimeConfigurable getRuntimeConfigurableWrapper()
protected void setRuntimeConfigurableWrapper(RuntimeConfigurable wrapper)
public void maybeConfigure() throws BuildException
protected void handleOutput(java.lang.String line)
protected void handleErrorOutput(java.lang.String line)
public void log(java.lang.String msg)
log
in class ProjectComponent
the
- message to be logged.public void log(java.lang.String msg, int msgLevel)
log
in class ProjectComponent
the
- message to be logged.msgLevel
- the message priority at which this message is to be logged.public final void perform()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |