../../AspectXLib/car/Car/aspects/CarPre.ax
NULL
). We want to modify this base code to do two
things:
RecoveryAction
. The recovery action should be a plug-in component
for the class where the parameter valildity check is performed.
Pointcuts | |
function | checkedMethods |
Points to all methods which ranges should be checked | |
class | checkedMethodsClasses |
Points to all classes that have methods which ranges should be checked | |
Advices | |
add | addRecoverySupportMethodDeclaration |
Adds a method setRecoveryAction() to the classes that supports recovery | |
add | addRecoverySupportFieldDeclaration |
Adds a declaration of field variable recoveryAction to classes that support recovery | |
add | addRecoverySupportDefinition |
Adds definition of method setRecoveryAction() to units (files) that contain definition of class that that have methods which ranges should be checked | |
begin | checkedMethods |
Adds code that validates the precondition | |
add | addIncludeDecl |
Adds #include "RecoveryAction | |
add | addIncludeDef |
Adds #include "RecoveryAction |
setPower
and
setLoadLevel
.
Engine
and Battery
.
Triplet: class add declaration
setRecoveryAction()
to the classes that supports recovery.Refers to global pointcut: class checkedMethodsClasses
Triplet: class add declaration
recoveryAction
to classes that support recovery.Refers to global pointcut: class checkedMethodsClasses
Triplet: unit add definition
setRecoveryAction()
to units (files) that contain definition of class that that have methods which ranges should be checked.Local Pointcut: unit (source)
Triplet: function begin codeFragment
Refers to global pointcut: function checkedMethods
Triplet: unit add include
#include "RecoveryAction.h"
to all units where classes with functions returning pointers are defined.Local Pointcut: unit (source)
Triplet: unit add include
#include "RecoveryAction.h"
to all units where functions returning pointer are defined.Local Pointcut: unit (source)