diff options
author | aclement <aclement> | 2009-09-05 01:46:06 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-09-05 01:46:06 +0000 |
commit | 444960d934b528b00f3d7959aa43b4477cf1f1ae (patch) | |
tree | 1b3443eaf2ec30449c2aeebc082079bb487bb0f3 /tests/multiIncremental/pr286341_base | |
parent | b9a0ccee12eb56a370c58010bbd89a27b8570724 (diff) | |
download | aspectj-444960d934b528b00f3d7959aa43b4477cf1f1ae.tar.gz aspectj-444960d934b528b00f3d7959aa43b4477cf1f1ae.zip |
286341: incremental anno style
Diffstat (limited to 'tests/multiIncremental/pr286341_base')
-rw-r--r-- | tests/multiIncremental/pr286341_base/base/src/Behavior.java | 15 | ||||
-rw-r--r-- | tests/multiIncremental/pr286341_base/base/src/Wibble.aj | 21 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/multiIncremental/pr286341_base/base/src/Behavior.java b/tests/multiIncremental/pr286341_base/base/src/Behavior.java new file mode 100644 index 000000000..f4af4a76c --- /dev/null +++ b/tests/multiIncremental/pr286341_base/base/src/Behavior.java @@ -0,0 +1,15 @@ +public class Behavior { + + public static void main(String[] args) { + new Behavior().m(); + } + + public void m() { + int i; + } + + public void m2() { + int i; + } +} + diff --git a/tests/multiIncremental/pr286341_base/base/src/Wibble.aj b/tests/multiIncremental/pr286341_base/base/src/Wibble.aj new file mode 100644 index 000000000..d1bf2fc3d --- /dev/null +++ b/tests/multiIncremental/pr286341_base/base/src/Wibble.aj @@ -0,0 +1,21 @@ +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; + +@Aspect +class Wibble { + + @Pointcut("if() && call(public * m*(..)) && target(b)") + public static boolean adviseIfMonitoring(Behavior b) { + return true; + } + + + @Around("adviseIfMonitoring(b)") + public Object monitorBehaviorPerformance(ProceedingJoinPoint pjp, Behavior b) + throws Throwable { + return pjp.proceed(); + } +} + |