-
Notifications
You must be signed in to change notification settings - Fork 36
Order of Execution
Transformations should be done in depth-first order to guarantee that everything is executed. Breadth-first order would have a slightly faster execution time as Remove transformations would potentially exclude other transformations from child nodes. For the same reason, this ordering could exclude transformations on lower level nodes that a user would like to execute.
In the same level, the order of priority for transformation is as follows:
Remove > Replace > Merge > Default > Rename
This order guarantees that explicitly named transforms execute first. It also guarantees that removals prevent unnecessary transformations from occurring.
To guarantee the order of execution defined previously, the transformed file is processed in the following order.
Starting from the root node:
- Iterate through all non-@jdt verbs
- Object
- If it exists in the original file: step into the object and start from step 1
- If it does not exist, enqueue a merge transformation
- Other: Enqueue a
default
transformation
- Object
- Enqueue all @jdt verbs
- Process all the transformation in the queue, per the order of execution