diff options
author | aclement <aclement> | 2006-04-26 16:45:17 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-04-26 16:45:17 +0000 |
commit | c667bcb5088379d74b89c3dc8556b87429e4efb7 (patch) | |
tree | e9d296ba9f3347c7484fe2a35445b1956d3f4068 /tests/bugs152 | |
parent | 99882cb91a94c468c185cf11cd6a728604e95bdb (diff) | |
download | aspectj-c667bcb5088379d74b89c3dc8556b87429e4efb7.tar.gz aspectj-c667bcb5088379d74b89c3dc8556b87429e4efb7.zip |
test and fix for 138286
Diffstat (limited to 'tests/bugs152')
-rw-r--r-- | tests/bugs152/pr138286/A.aj | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs152/pr138286/A.aj b/tests/bugs152/pr138286/A.aj new file mode 100644 index 000000000..2c20ea79f --- /dev/null +++ b/tests/bugs152/pr138286/A.aj @@ -0,0 +1,31 @@ +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.*; + +@Retention(RUNTIME) +@Inherited +@interface MyAnnotation {} + +public aspect A perthis(annotatedClasses()) { + + pointcut annotatedClasses() : @this(MyAnnotation); + + before(): initialization(*.new(..)) {System.err.println(thisJoinPoint.getSignature().getDeclaringType()); } + + public static void main(String []argv) { + new Foo(); + new Goo(); + new Boo(); + new Soo(); + } +} + +// yes/no indicates if runtime match expected for staticinitialization + +@MyAnnotation class Foo { } // YES + +class Goo { } // NO + +@MyAnnotation class Boo { } // YES + +class Soo extends Boo { } // YES
\ No newline at end of file |