diff options
author | jhugunin <jhugunin> | 2003-01-01 00:07:53 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-01-01 00:07:53 +0000 |
commit | 08b0b1f657f4ee3fb5f810db6f0df63bd1fecdc4 (patch) | |
tree | 64336338d39d8086a32d7920f95ed93a080b6c33 /tests/new/Counting1.java | |
parent | 28f09b17d4991c6754d0a2b701a6f6eb4abdbed0 (diff) | |
download | aspectj-08b0b1f657f4ee3fb5f810db6f0df63bd1fecdc4.tar.gz aspectj-08b0b1f657f4ee3fb5f810db6f0df63bd1fecdc4.zip |
expanded coverage
Diffstat (limited to 'tests/new/Counting1.java')
-rw-r--r-- | tests/new/Counting1.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/new/Counting1.java b/tests/new/Counting1.java index d57789612..6027409e2 100644 --- a/tests/new/Counting1.java +++ b/tests/new/Counting1.java @@ -68,6 +68,8 @@ class Point implements FigureElement { } class Line implements FigureElement { + + private Point _p1, _p2; Line (Point p1, Point p2) { @@ -141,16 +143,30 @@ aspect MoveTracking { } aspect Mobility { declare dominates: Mobility, MoveTracking; + private static boolean enableMoves = true; static void enableMoves() { enableMoves = true; } static void disableMoves() { enableMoves = false; } + private int getSomething() { return 10; } + void around(): MoveTracking.moves() { - if ( enableMoves ) + int x = getSomething(); + if ( enableMoves || enableMoves ) proceed(); //!!! in versions prior to 0.7b10 runNext is a //!!! method on the join point object, so the //!!! syntax of this call is slightly different //!!! than in the paper } + + void around(int i): args(i) && call(void *gaoijbal()) { + if (enableMoves) throw new RuntimeException("bad things"); + } +} + +privileged aspect Foo { + public static boolean getEnableMoves() { + return Mobility.enableMoves; + } } |