aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs152/pr138223
diff options
context:
space:
mode:
authoracolyer <acolyer>2006-04-24 17:46:06 +0000
committeracolyer <acolyer>2006-04-24 17:46:06 +0000
commit6b2526fdda56e30d8a151ca0b9bd16ecb690d3d0 (patch)
treef68ddd216a18f27c517118dc75fa963ebaf2c5c2 /tests/bugs152/pr138223
parent8c084b533078c9d640aa9d1530e673d744d546ad (diff)
downloadaspectj-6b2526fdda56e30d8a151ca0b9bd16ecb690d3d0.tar.gz
aspectj-6b2526fdda56e30d8a151ca0b9bd16ecb690d3d0.zip
test cases for pr138215, 219, and 223.
Diffstat (limited to 'tests/bugs152/pr138223')
-rw-r--r--tests/bugs152/pr138223/DoubleAnnotationMatching.aj33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs152/pr138223/DoubleAnnotationMatching.aj b/tests/bugs152/pr138223/DoubleAnnotationMatching.aj
new file mode 100644
index 000000000..415309421
--- /dev/null
+++ b/tests/bugs152/pr138223/DoubleAnnotationMatching.aj
@@ -0,0 +1,33 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Tx {
+ boolean readOnly() default false;
+}
+
+public aspect DoubleAnnotationMatching {
+
+
+ pointcut methodInTxType(Tx tx) :
+ execution(* *(..)) && @this(tx) && if(tx.readOnly());
+
+ pointcut txMethod(Tx tx) :
+ execution(* *(..)) && @annotation(tx) && if(tx.readOnly());
+
+ pointcut transactionalOperation() :
+ methodInTxType(Tx) || txMethod(Tx);
+
+ before() : transactionalOperation() {
+ // do something
+ }
+
+}
+
+@Tx class Foo {
+
+ public void foo() {}
+
+ @Tx public void bar() {}
+
+
+} \ No newline at end of file