Class ApplyOperator
java.lang.Object
ca.mcscert.jpipe.operators.ApplyOperator
- All Implemented Interfaces:
Command, MacroCommand
A deferred
MacroCommand that expands an operator call into the
Commands needed to build the result model.
Execution is deferred until all source models named in sourceNames()
are present in the Unit. Once the condition is satisfied,
expand(Unit) looks up the operator in the OperatorRegistry,
gathers the source models, and delegates to
CompositionOperator.apply(String, List, Map).
-
Constructor Summary
ConstructorsConstructorDescriptionApplyOperator(OperatorCallConfig config, OperatorRegistry operators, UnificationEquivalenceRegistry unificationEquivalences) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface MacroCommand
execute
-
Constructor Details
-
ApplyOperator
public ApplyOperator(OperatorCallConfig config, OperatorRegistry operators, UnificationEquivalenceRegistry unificationEquivalences)
-
-
Method Details
-
resultName
-
operatorName
-
sourceNames
-
arguments
-
location
-
condition
-
expand
Description copied from interface:MacroCommandExpands this macro into a sequence of atomic commands to be executed in order.- Specified by:
expandin interfaceMacroCommand- Parameters:
context- the current unit, available to inspect model state.- Returns:
- the list of commands to splice into the execution queue.
-
toString
-