1   /***************************************************************************************
2    * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved.                 *
3    * http://aspectwerkz.codehaus.org                                                    *
4    * ---------------------------------------------------------------------------------- *
5    * The software in this package is published under the terms of the LGPL license      *
6    * a copy of which has been included with this distribution in the license.txt file.  *
7    **************************************************************************************/
8   package test.performance;
9   
10  import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
11  import org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint;
12  
13  /***
14   * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
15   * @Aspect perJVM
16   */
17  public class PerJVMPerformanceAspect {
18      /***
19       * Around execution(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM())
20       *
21       * @Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM())
22       * &&
23       * within(test.performance.*)
24       */
25      public Object advice1(final StaticJoinPoint joinPoint) 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  }