org.apache.tools.ant
Class BuildEvent

public class BuildEvent
extends EventObject
Class representing an event occurring during a build. An event is built by specifying either a project, a task or a target. A project level event will only have a project reference; a target level event will have project and target references; a task level event will have project, target and task references.
SinceNot specified.
VersionNot specified.
AuthorNot specified.
Wiki javadoc Use textile entry format.
Add your comments here.
Fields inherited from java.utilEventObject
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
Throwable getException()
Returns the exception that was thrown, if any.
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( Throwable exception )
Sets the exception associated with this event.
void setMessage( String message, int priority )
Sets the message and priority associated with this event.
Methods inherited from java.utilEventObject
BuildEvent
public BuildEvent ( Project project )
Construct a BuildEvent for a project level event.
Parameters
TypeNameDescription
Project project the project that emitted the event. Should not be null.
Wiki javadoc Use textile entry format.
Add your comments here.
BuildEvent
public BuildEvent ( Target target )
Construct a BuildEvent for a target level event. The project associated with the event is derived from the given target.
Parameters
TypeNameDescription
Target target the target that emitted the event. Must not be null.
Wiki javadoc Use textile entry format.
Add your comments here.
BuildEvent
public BuildEvent ( Task task )
Construct a BuildEvent for a task level event. The project and target associated with the event are derived from the given task.
Parameters
TypeNameDescription
Task task the task that emitted the event. Must not be null.
Wiki javadoc Use textile entry format.
Add your comments here.
getException
public Throwable getException ( )
Returns the exception that was thrown, if any. This field will only be set for "taskFinished", "targetFinished", and "buildFinished" events.
Wiki javadoc Use textile entry format.
Add your comments here.
getMessage
public String getMessage ( )
Returns the logging message. This field will only be set for "messageLogged" events.
Wiki javadoc Use textile entry format.
Add your comments here.
getPriority
public int getPriority ( )
Returns the priority of the logging message. This field will only be set for "messageLogged" events. The meaning of this priority is as specified by the constants in the Project class.
Wiki javadoc Use textile entry format.
Add your comments here.
getProject
public Project getProject ( )
Returns the project that fired this event.
Wiki javadoc Use textile entry format.
Add your comments here.
getTarget
public Target getTarget ( )
Returns the target that fired this event.
Wiki javadoc Use textile entry format.
Add your comments here.
getTask
public Task getTask ( )
Returns the task that fired this event.
Wiki javadoc Use textile entry format.
Add your comments here.
setException
public void setException ( Throwable exception )
Sets the exception associated with this event. This is used for "taskFinished", "targetFinished", and "buildFinished" events.
Parameters
TypeNameDescription
Throwable exception The exception to be associated with this event. May be null.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setMessage
public void setMessage ( String message, int priority )
Sets the message and priority associated with this event. This is used for "messageLogged" events.
Parameters
TypeNameDescription
String message the message to be associated with this event. Should not be null.
int priority the priority to be associated with this event, as defined in the Project class.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.