blob: e5f3a0273fff0dde06cddd1af73e0344b5192dba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package ma.aspect3;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
@Aspect
public class Aspect3 {
@Around("(execution(@ma.aspect3.Annotation3 * *(..)) || execution(@ma.aspect3.Annotation3 *.new(..)))")
public Object inTimeLimiterAspect(ProceedingJoinPoint pjp) throws Throwable {
InnerClass2 c = new InnerClass2();
System.out.println(">In Aspect3");
try {
Object returnedObject = pjp.proceed();
System.out.println("<In Aspect3");
return returnedObject;
} catch (Exception e) {
System.out.println("<In Aspect3");
throw e;
}
}
private static class InnerClass2 {
}
}
|