declaration_add_comment.xsl

Weaving Rule that adds a comment to a declaration (class/method/constructor/destructor/fields)
  • srcML element: src:function_decl, src:function, src:class, src:constructor, src:constructor_decl, src:constructor, src:destructor, src:destructor_decl, src:decl_stmt
  • advice type: add
  • codeModifier type: comment

Example 1

int foo();

Code Modifier

<codeModifier type="comment">
  <text>/** A comment */</text>
</codeModifier>

Modified Code

/** A comment */
int foo();

Examples in AspectX Sample Library

CVS Id:
Author:
ibirrer
Copyright:
2004, P&P Software GmbH