01: /**************************************************************************************
02: * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package test.performance;
08:
09: import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
10: import org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint;
11:
12: /**
13: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
14: * @Aspect perJVM
15: */
16: public class PerJVMPerformanceAspect {
17: /**
18: * Around execution(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM())
19: *
20: * @Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM())
21: * &&
22: * within(test.performance.*)
23: */
24: public Object advice1(final StaticJoinPoint joinPoint)
25: throws Throwable {
26: return joinPoint.proceed();
27: }
28:
29: /**
30: * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) &&
31: * within(test.performance.*)
32: */
33: public Object advice2(final JoinPoint joinPoint) throws Throwable {
34: return joinPoint.proceed();
35: }
36:
37: /**
38: * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) &&
39: * within(test.performance.*)
40: */
41: public Object advice3(final JoinPoint joinPoint) throws Throwable {
42: return joinPoint.proceed();
43: }
44:
45: /**
46: * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) &&
47: * within(test.performance.*)
48: */
49: public Object advice4(final JoinPoint joinPoint) throws Throwable {
50: return joinPoint.proceed();
51: }
52:
53: /**
54: * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) &&
55: * within(test.performance.*)
56: */
57: public Object advice5(final JoinPoint joinPoint) throws Throwable {
58: return joinPoint.proceed();
59: }
60:
61: /**
62: * @Mixin within(test.performance.PerformanceTest)
63: */
64: public static class PerJVMImpl implements PerJVM {
65: public void runPerJVM() {
66: }
67: }
68: }
|