public class BuildEvent
extends java.util.EventObject
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Sets the exception associated with this event.
|
void |
setMessage(java.lang.String message,
int priority)
Sets the message and priority associated with this event.
|
public BuildEvent(Project project)
project - the project that emitted the event.
Should not be null.public BuildEvent(Target target)
target - the target that emitted the event.
Must not be null.public BuildEvent(Task task)
task - the task that emitted the event.
Must not be null.public void setMessage(java.lang.String message,
int priority)
message - the message to be associated with this event.
Should not be null.priority - the priority to be associated with this event,
as defined in the Project class.BuildListener.messageLogged(BuildEvent)public void setException(java.lang.Throwable exception)
exception - The exception to be associated with this event.
May be null.BuildListener.messageLogged(BuildEvent),
BuildListener.taskFinished(BuildEvent),
BuildListener.targetFinished(BuildEvent),
BuildListener.buildFinished(BuildEvent)public Project getProject()
public Target getTarget()
null
if this event is a project level event.public Task getTask()
null
if this event is a project or target level event.public java.lang.String getMessage()
null
if no message has been set.BuildListener.messageLogged(BuildEvent)public int getPriority()
Project class.BuildListener.messageLogged(BuildEvent)public java.lang.Throwable getException()
null if no exception has been set.BuildListener.messageLogged(BuildEvent),
BuildListener.taskFinished(BuildEvent),
BuildListener.targetFinished(BuildEvent),
BuildListener.buildFinished(BuildEvent)