GrinderContext class
A GrinderContext is used to give the currently running Grinder task the ability to introspect the running state. It can get the current Grinder instance and get a reference to the current GrinderTask instance (as well as the previous and next tasks, if any).
A GrinderContext also allows you to log messages and errors.
Constructors
- GrinderContext(Grinder grinder, GrinderTask task, TaskInvocation invocation)
Properties
- grinder → Grinder
-
The Grinder instance.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- invocation → TaskInvocation
-
The current TaskInvocation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- task → GrinderTask
-
The current running GrinderTask.
final
Methods
-
fail(
String message) → Never - Halt task execution; throws an exception with the given error message.
-
log(
String message) → void - Log an informational message to Grinder's output.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited