Action

interface Action

Action 表示 Task 的一个步骤, 是最小的执行单元.

每个 Task 都可以包含多个 Action, 每个 Action 都可以通过 setName 指定名称.

Author

M8Test, [email protected], https://m8test.com

Inheritors

Functions

Link copied to clipboard
abstract fun getName(): String

获取当前动作的名称.

Link copied to clipboard
abstract fun isNecessary(): Boolean

表示当前 Action 是否为必要的, 默认情况下返回 true.

Link copied to clipboard
abstract fun onPerform(executor: (Task) -> Unit)

设置动作需要执行的操作.

Link copied to clipboard
abstract fun setNecessary(necessary: Boolean)

设置当前 Action 是否为必要的.