AddClassComment_2 Aspect
[Basic Group]
This aspect is defined in file: ../../AspectXLib/base/Base/aspects/AddClassComment_2.ax
Aspect 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 set of target classes. The target classes are defined through a name pattern. The target classes are
those whose name begins with the string "DC_Dummy".
A related aspect program (AddClassComment_1) shows an alternative way to modify class comments.
- Author:
- A. Pasetti
- See also:
- AddClassComment_1
|
Pointcuts |
| class | targetClass |
| | Points to the target classes whose comment should be modified
|
| comment | targetClassComment |
| | Points to the comments that must be modified
|
|
Advices |
| end | addClassComment |
| | Add a comment at the end of the comment of the target class
|
Pointcut Documentation
Points to the target classes whose comment should be modified. The target classes are
identified as follows. In srcML, classes are described by a "class" element which have a subelement called "name" which
holds the name of the class. The target classes are identified using an XPath expression that identifies all class elements with
a name that starts with the string "DC_Dummy".
comment
targetClassComment
(
source)
Points to the comments that must be modified. These comments are defined as the comments that are
followed by the targetClass pointcut.
Advice Documentation
Triplet: comment end comment
Add a comment at the end of the comment of the target class. A CDATA section is used in order to allow use of
HTML tags in the comment text. Aspect program AddClassComment_1 shows an alternative way to express the HTML tag.
Refers to global pointcut: comment targetClassComment