<aspect xmlns:src="http://www.sdml.info/srcML/src" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cpp="http://www.sdml.info/srcML/cpp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://control.ee.ethz.ch/XWeaver/AspectX" xsi:schemaLocation="http://control.ee.ethz.ch/XWeaver/AspectX ../../../../src/xsd/aspectX.xsd" name="AddClassComment_1">
        
<description>Sample aspect program to modify a class comment. This aspect program defines a text
                fragment that can be added to the comment of a target class. The target class is defined by name
                and is equal to 
<code>DC_DummyPunctualAction</code>. A related aspect program
                (
<code>AddClassComment_2</code>) shows an alternative way to modify class comments. <author>A. Pasetti</author>
                
<see>AddClassComment_2</see>
        
</description>
        
        
<pointcut name="targetClass" type="src:class" constraint="src:name='DC_DummyPunctualAction'">
                
<description>Points to the target class whose comment should be modified. </description>
        
</pointcut>
        
        
<pointcut name="targetClassComment" type="src:comment">
                
<description>Points to the comment that must be modified. This comment is defined as the comment
                        that is followed by the 
<code>targetClass</code> pointcut. </description>
                
<restriction type="followedBy">
                        
<pointcutRef type="src:class" ref="targetClass" />
                
</restriction>
        
</pointcut>
        
        
<advice name="addClassComment" type="end">
                
<description>Add a comment at the end of the comment of the target class. The HTML tags in the
                        comment are expressed using escape sequences. Aspect program 
<code>AddClassComment_2</code>
                        shows an alternative way to express the HTML tag.
</description>
                
<pointcutRef ref="targetClassComment" type="src:comment" />
                
<codeModifier type="comment">
                        
<text>This comment fragment was automatically inserted by an aspect program.</text>
                        
<text>The name of the aspect program is: &lt;code&gt;AddClassComment_1&lt;/code&gt;.</text>
                
</codeModifier>
        
</advice>
</aspect>






































v