Package ghidra.framework.task
Class GTaskResult
java.lang.Object
ghidra.framework.task.GTaskResult
Class to represent the result state of a GTask, such as whether it was cancelled or an exception
happened.
-
Constructor Summary
ConstructorDescriptionGTaskResult
(GTaskGroup group, GScheduledTask task, Exception e, Integer transactionID) Constructs a GTaskResult for a completed GTask with an optional exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the task that was run.Returns the exception generated by the task, or null if no exception was generated.Returns the description for the group for which this task belonged.int
Returns the priority at which the task was run within its group.boolean
hasSameTransaction
(GTaskResult result) Returns true if the task represented by this result was executed in the same transaction as the task represented by the given GTaskResult.toString()
boolean
Returns true if the task for this result was cancelled.
-
Constructor Details
-
GTaskResult
Constructs a GTaskResult for a completed GTask with an optional exception.- Parameters:
group
- The GTaskGroup that the completed GTask belonged to.task
- the GScheduledTask which contains the actual GTask that has completed.e
- optional exception recorded if an exception occurred while processing the task. If the task was cancelled, there should be a CancelledException passed in here.transactionID
- The transaction id for the transaction that was open when the task was executed. Used by the results GUI to indicate when transactions are opened and closed between tasks.
-
-
Method Details
-
getDescription
Returns a description of the task that was run.- Returns:
- a description of the task that was run.
-
wasCancelled
public boolean wasCancelled()Returns true if the task for this result was cancelled.- Returns:
- true if the task for this result was cancelled.
-
getException
Returns the exception generated by the task, or null if no exception was generated. If the task was cancelled, this will return a CancelledException.- Returns:
- the exception generated by this task or null.
-
getPriority
public int getPriority()Returns the priority at which the task was run within its group.- Returns:
- the priority at which the task was run within its group.
-
getGroupDescription
Returns the description for the group for which this task belonged.- Returns:
- the description for the group for which this task belonged.
-
hasSameTransaction
Returns true if the task represented by this result was executed in the same transaction as the task represented by the given GTaskResult.- Parameters:
result
- the result to check if it was executed in the same transaction as this task result.- Returns:
- true if same transaction.
-
toString
-