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 * @Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) 21 * && 22 * within(test.performance.*) 23 */ 24 public Object advice1(final StaticJoinPoint joinPoint) throws Throwable { 25 return joinPoint.proceed(); 26 } 27 28 /*** 29 * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) && 30 * within(test.performance.*) 31 */ 32 public Object advice2(final JoinPoint joinPoint) throws Throwable { 33 return joinPoint.proceed(); 34 } 35 36 /*** 37 * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) && 38 * within(test.performance.*) 39 */ 40 public Object advice3(final JoinPoint joinPoint) throws Throwable { 41 return joinPoint.proceed(); 42 } 43 44 /*** 45 * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) && 46 * within(test.performance.*) 47 */ 48 public Object advice4(final JoinPoint joinPoint) throws Throwable { 49 return joinPoint.proceed(); 50 } 51 52 /*** 53 * Around call(void test.performance.PerformanceTest.methodAdvisedMethodPerJVM()) && 54 * within(test.performance.*) 55 */ 56 public Object advice5(final JoinPoint joinPoint) throws Throwable { 57 return joinPoint.proceed(); 58 } 59 60 /*** 61 * @Introduce within(test.performance.PerformanceTest) 62 */ 63 public static class PerJVMImpl implements PerJVM { 64 public void runPerJVM() { 65 } 66 } 67 }