Micropattern basic declaration principle
You insert a micropattern in the source code.
<MP-sequence><Micropattern ID> [<standard parameter> ]*
<header-delimiter-sequence><configuration area>
- <Micropattern ID> : [a-z,A-Z,[0-9]]*
- <configuration area> : [<any character>]*
- [<standard parameter> ] : <parameter-name> = ["] <value> ["]
If you use a multi-line configuration area or multiple standard parameters, constraints might apply to each line format, depending on the underlying source code technology.
....|....1....|....2....|....3....|....4....|....5....|....6.
*!INVERT / A B
MOVE A TO TMP.
MOVE B TO A.
MOVE TMP TO B.
Upon generation, the micropattern engine is invoked to start the micropattern expansion process that will finally call the micro-generators. These micro-generators are instances of com.ibm.pdp.engine.IMicroPatternHandler.
The micropattern handler can then generate or generate again all or parts of its local generation area. It uses its given parameters, the pattern rules, and the underlying model as input. It can also use its local generation area as an input, thus analyzing this piece of source code to define new inputs.