saker.build Documentation TaskDoc JavaDoc Packages
public interface ParameterizableTask<Rextends Task<R>
Extension interface for Task for representing a task that can be parameterized.

Clients of this interface must call initParameters(TaskContext, NavigableMap<String, ? extends TaskIdentifier>) before calling Task.run(TaskContext), even if no parameters were specified for the task.

RThe return type of the task.
Methods
public default void
initParameters(TaskContext taskcontext, NavigableMap<String, ? extends TaskIdentifier> parameters)
Initializes the parameters of this task.
Inherited methods
From: Task<R>
public default void initParameters(TaskContext taskcontext, NavigableMap<String, ? extends TaskIdentifier> parameters) throws TaskParameterException
Initializes the parameters of this task.

This method is called at most once during the lifetime of the task object and always before Task.run(TaskContext).

The default implementation initializes the parameters of this task instance by looking at its declared fields annotated with SakerInput and related annotations.

The unnamed parameter (if any) is available in the argument map with the "" (empty string) key.

taskcontextThe task context to communicate with the build system.
parametersThe parameters mapped by parameter name to corresponding tasks.
TaskParameterExceptionIn case of parameter initialization error.