block_begin_codeFragment.xsl
Weaving Rule that weaves a code fragment at the beginning of a block.
- srcML element:
src:block - advice type:
begin - codeModifier type:
codeFragment
Example 1
Base Code
int foo() {
printf("Hello");
}
Code Modifier
<codeModifier type="codeFragment">
<text>printf("Hello World")</text>
</codeModifier>Modified Code
int foo() {
printf("Hello World");
printf("Hello");
}
Examples in AspectX Sample Library
- Efficiency
Examples in AspectX Test Suite
- AddMultiLineAtBegin
- AddSingleLineAtBegin
- AddSingleLineAtBeginAndEnd
CVS Id:
Author:
ibirrer
Copyright:
2004, P&P Software GmbH
Match Templates Summary
src:block[ax:advice[@type='begin' and position() = 1]/ax:codeModifier[@type='codeFragment']] (mode: weaving) - source
Apply tempates with mode to all (excludig
advice elements) child elements
Match Templates Detail
src:block[ax:advice[@type='begin' and position() = 1]/ax:codeModifier[@type='codeFragment']] (mode: weaving) - source
Apply tempates with mode to all (excludig
advice elements) child elements