Try writing the following pointcuts statically capturing some joinpoints:
(According to the posts AOP - Pointcuts 1, AOP - Pointcuts 2)
- The pointcut that captures any call to any int method containing the word "Method" in its name. For example:
public static void main(){
D d = new D();
1. d.thisMethodIsCool();
}
}
class D{
public int thisMethodIsCool(){
2. System.out.println("within the cool method");
}
}
The pointcut should match the call in line 1 of class C.
- The same as before but now capture the execution of the method, i.e., when the eecution flow is within line 2 of class D.
- This pointcut should match whenever a String field named "name" is set
No comments:
Post a Comment