Interface TaskState
TaskState provides information about the execution state of a Task.
 
 You can obtain a TaskState instance by calling Task.getState().
 
 Accessing the details of the task state is only meaningful after the task has been
 executed.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanChecks if the task actually did any work.booleanReturns true if this task has been executed.Returns the exception describing the task failure, if any.booleanReturns true if the execution of this task was skipped due to task inputs are empty.Returns a message describing why the task was skipped.booleanReturns true if the execution of this task was skipped for some reason.booleanReturns true if the execution of this task was skipped because the task was up-to-date.voidThrows the task failure, if any.
- 
Method Details- 
getExecutedboolean getExecuted()Returns true if this task has been executed.The task is considered executed if an attempt of the execution was made, and it has a definite outcome. The outcome itself does not affect the execution status. For instance, failed or skipped tasks will also be considered executed. - Returns:
- true if this task has been executed.
 
- 
getFailureReturns the exception describing the task failure, if any.Checking this value is meaningful only after the task has been executed.- Returns:
- The exception, or null if the task did not fail.
 
- 
rethrowFailurevoid rethrowFailure()Throws the task failure, if any. Does nothing if the task did not fail.Calling this method is meaningful only after the task has been executed.- See Also:
 
- 
getDidWorkboolean getDidWork()Checks if the task actually did any work.Even if a task executes, it may determine that it has nothing to do. For example, a compilation task may determine that source files have not changed since the last time the task was run. Checking this value is meaningful only after the task has been executed.- Returns:
- true if this task has been executed and did any work.
 
- 
getSkippedboolean getSkipped()Returns true if the execution of this task was skipped for some reason.Checking this value is meaningful only after the task has been executed.- Returns:
- true if this task has been executed and skipped.
 
- 
getSkipMessageReturns a message describing why the task was skipped.Checking this value is meaningful only after the task has been executed.- Returns:
- the message. returns null if the task was not skipped.
 
- 
getUpToDateboolean getUpToDate()Returns true if the execution of this task was skipped because the task was up-to-date.Checking this value is meaningful only after the task has been executed.- Returns:
- true if this task has been considered up-to-date
- Since:
- 2.5
 
- 
getNoSourceboolean getNoSource()Returns true if the execution of this task was skipped due to task inputs are empty.Checking this value is meaningful only after the task has been executed.- Returns:
- true if this task has no input files assigned
- Since:
- 3.4
 
 
-