diff options
author | Andy Clement <aclement@pivotal.io> | 2018-11-19 09:15:58 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2018-11-19 09:15:58 -0800 |
commit | 450c1fe05731c1084bfabb22d7595f39ac19b8c6 (patch) | |
tree | a4e4248a781bceeeae26fe6c40572cbde94e5b7f /tests/bugs193/isAbstractType | |
parent | 49ea3fa06fe01630938ccff53bfd2f83ea3d60c6 (diff) | |
download | aspectj-450c1fe05731c1084bfabb22d7595f39ac19b8c6.tar.gz aspectj-450c1fe05731c1084bfabb22d7595f39ac19b8c6.zip |
Fix 541325 - Support is(AbstractType)
Diffstat (limited to 'tests/bugs193/isAbstractType')
-rw-r--r-- | tests/bugs193/isAbstractType/Code.java | 24 | ||||
-rw-r--r-- | tests/bugs193/isAbstractType/Code2.java | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/tests/bugs193/isAbstractType/Code.java b/tests/bugs193/isAbstractType/Code.java new file mode 100644 index 000000000..03790c6d8 --- /dev/null +++ b/tests/bugs193/isAbstractType/Code.java @@ -0,0 +1,24 @@ +public class Code { + public static void main(String[] argv) { + new Code().run(); + } + + public void run() { + new Code3().run(); + } +} + +abstract class Code2 { + public void run() { + } +} + +class Code3 extends Code2 { +} + +aspect X { + before(): execution(* (!is(AbstractType)).run(..)) { + System.out.println(thisJoinPointStaticPart); + } +} + diff --git a/tests/bugs193/isAbstractType/Code2.java b/tests/bugs193/isAbstractType/Code2.java new file mode 100644 index 000000000..65d8d0d05 --- /dev/null +++ b/tests/bugs193/isAbstractType/Code2.java @@ -0,0 +1,24 @@ +public class Code2 { + public static void main(String[] argv) { + new Code2().run(); + } + + public void run() { + new Helper2().run(); + } +} + +abstract class Helper { + public void run() { + } +} + +class Helper2 extends Helper { +} + +aspect X { + before(): execution(* (is(AbstractType)).run(..)) { + System.out.println(thisJoinPointStaticPart); + } +} + |