../../AspectXLib/java/ShoppingCart/aspects/TraceAspectStd.axaddImports) and
adding members (advice addLoggerField).
It also uses common weaving rules for adding trace calls at the begin and end of a method and
before return statements.
Pointcuts | |
| function | allFunctions |
| Points to the all methods | |
| constructor | allConstructors |
| Points to the all construtors | |
Advices | |
| begin | enterFunction |
| Weave the log message at the beginning of every method | |
| end | endFunction |
| Weave the log message at the end of every method that
has no return value | |
| before | beforeReturn |
| Weave the log message before return statement of
every method | |
| add | addLoggerField |
|
Adds a logger field variable to every class
that contains a construtor or a method | |
| begin | enterConstructor |
|
Weave the log message at the beginning of every construtor | |
| add | addImports |
|
Add the import statement for the java | |
Triplet: function begin codeFragment
Refers to global pointcut: function allFunctions
Triplet: function end codeFragment
Local Pointcut: function (source)
Triplet: return before codeFragment
Local Pointcut: return (source)
Triplet: class add member
Local Pointcut: class (source)
Triplet: constructor begin codeFragment
Refers to global pointcut: constructor allConstructors
Triplet: unit add import
import statement for the java.util.logging.*
and aspect.* packages.
Inclusion of those packages is necessary because the
code that is woven into the target methods
calls the method logp() of calss Logger.
Local Pointcut: unit (source)