Package org.gradle.api.execution

## Class TaskExecutionAdapter

- java.lang.Object
- - org.gradle.api.execution.TaskExecutionAdapter

- All Implemented Interfaces:
    `TaskExecutionListener`

      public class TaskExecutionAdapter
      extends java.lang.Object
      implements TaskExecutionListener

  A `TaskExecutionListener` adapter class for receiving task execution events. The methods in this class are empty. This class exists as convenience for creating listener objects.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TaskExecutionAdapter()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `afterExecute​(Task task, TaskState state)` | This method is called immediately after a task has been executed.
    `void` | `beforeExecute​(Task task)` | This method is called immediately before a task is executed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskExecutionAdapter

          public TaskExecutionAdapter()

  - ### Method Detail

    - #### beforeExecute

          public void beforeExecute​(Task task)

      Description copied from interface: `TaskExecutionListener`
      This method is called immediately before a task is executed.
      Specified by:
        `beforeExecute` in interface `TaskExecutionListener`
      Parameters:
        `task` - The task about to be executed. Never null.

    - #### afterExecute

          public void afterExecute​(Task task,
                                   TaskState state)

      Description copied from interface: `TaskExecutionListener`
      This method is called immediately after a task has been executed. It is always called, regardless of whether the task completed successfully, or failed with an exception.
      Specified by:
        `afterExecute` in interface `TaskExecutionListener`
      Parameters:
        `task` - The task which was executed. Never null.
        `state` - The task state. If the task failed with an exception, the exception is available in this state. Never null.