org.apache.tools.ant
Class BuildEvent
java.lang.Object
|
+--java.util.EventObject
|
+--org.apache.tools.ant.BuildEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class BuildEvent
- extends java.util.EventObject
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
BuildEvent(Project project)
Construct a BuildEvent for a project level event |
BuildEvent(Target target)
Construct a BuildEvent for a target level event |
BuildEvent(Task task)
Construct a BuildEvent for a task level event |
Method Summary |
java.lang.Throwable |
getException()
Returns the exception that was thrown, if any. |
java.lang.String |
getMessage()
Returns the logging message. |
int |
getPriority()
Returns the priority of the logging message. |
Project |
getProject()
Returns the project that fired this event. |
Target |
getTarget()
Returns the target that fired this event. |
Task |
getTask()
Returns the task that fired this event. |
void |
setException(java.lang.Throwable exception)
|
void |
setMessage(java.lang.String message,
int priority)
|
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BuildEvent
public BuildEvent(Project project)
- Construct a BuildEvent for a project level event
- Parameters:
project
- the project that emitted the event.
BuildEvent
public BuildEvent(Target target)
- Construct a BuildEvent for a target level event
- Parameters:
target
- the target that emitted the event.
BuildEvent
public BuildEvent(Task task)
- Construct a BuildEvent for a task level event
- Parameters:
task
- the task that emitted the event.
setMessage
public void setMessage(java.lang.String message,
int priority)
setException
public void setException(java.lang.Throwable exception)
getProject
public Project getProject()
- Returns the project that fired this event.
getTarget
public Target getTarget()
- Returns the target that fired this event.
getTask
public Task getTask()
- Returns the task that fired this event.
getMessage
public java.lang.String getMessage()
- Returns the logging message. This field will only be set
for "messageLogged" events.
- See Also:
BuildListener.messageLogged(BuildEvent)
getPriority
public int getPriority()
- Returns the priority of the logging message. This field will only
be set for "messageLogged" events.
- See Also:
BuildListener.messageLogged(BuildEvent)
getException
public java.lang.Throwable getException()
- Returns the exception that was thrown, if any. This field will only
be set for "taskFinished", "targetFinished", and "buildFinished" events.
- See Also:
BuildListener.taskFinished(BuildEvent)
,
BuildListener.targetFinished(BuildEvent)
,
BuildListener.buildFinished(BuildEvent)
Includes only those classes commonly used by task writers. The Ant 1.4.1 distribution includes complete Javadoc for all classes included in Ant, though in most cases these are not intended as APIs.