diff options
Diffstat (limited to 'tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java')
-rw-r--r-- | tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java b/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java new file mode 100644 index 000000000..4da93f0ca --- /dev/null +++ b/tests/incrementalju/initialTests/classWAroundClosureRemoved/src/AdviceOnIntroduced.java @@ -0,0 +1,26 @@ +import org.aspectj.testing.Tester; + +public aspect AdviceOnIntroduced { + public static void main(String[] args) { test(); } + + public static void test() { + Tester.checkEqual(new Foo(10).foo(5), 6, "foo"); + } + + int Foo.foo(int n) { return n; } + Foo.new(int w) {} + + int around(int n): + within(AdviceOnIntroduced) && + (args(n) && execution(int foo(int))) { + int result = proceed(n); + return result+1; + } + + before(): within(Foo) && execution(new(..)) { + //System.out.println("before new"); + } +} + +class Foo { +} |