-
Notifications
You must be signed in to change notification settings - Fork 6
Delegates
Andi Huber edited this page Nov 11, 2019
·
1 revision
Proposes an addition to the existing Supporting Methods
Extending on the idea of providing default values for Action parameters, we could delegate to another Action, that provides the parameter value.
We are tracking this as jira issue here.
How this could look like (3 sketches, each slightly more sophisticated than the previous)
@Action
Object anAction(X, Y, Z)
^
:
+---------------+
:
+
X delegate0AnAction(U, V, ...); // provides a value for parameter index=0 (X)
Takes an arbitrary list of arguments (like an action).
@Action
Object anAction(X, Y, Z) // 'master' action
^
:
+---------------+
: bound to param X
:
: @Action
+-- X anotherAction(U, V, ...); // provides a value for parameter index=0 (X)
Binds an Action’s result to one of the 'master' Action’s parameters.
But then how to declare this binding?
-
Also this 'delegate' Action should allow reuse for other Actions as well.
-
Also for a single parameter, it could be made possible to bind multiple 'delegate' Actions.