diff options
author | Andy Clement <andrew.clement@gmail.com> | 2013-01-21 17:56:20 -0800 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2013-01-21 17:56:20 -0800 |
commit | f54f44a104806b06ab72b223c55d71476c95415d (patch) | |
tree | 990b928064e6cc988086f8402c9da22681c5534c /tests/bugs172 | |
parent | 96ebaaed65fe5d507cae3d56126d76f217a9f13a (diff) | |
download | aspectj-f54f44a104806b06ab72b223c55d71476c95415d.tar.gz aspectj-f54f44a104806b06ab72b223c55d71476c95415d.zip |
Allow code generation hints for generated compiler names
Diffstat (limited to 'tests/bugs172')
-rw-r--r-- | tests/bugs172/pr398246/Code.java | 19 | ||||
-rw-r--r-- | tests/bugs172/pr398246/Code2.java | 20 | ||||
-rw-r--r-- | tests/bugs172/pr398246/Code3.java | 21 | ||||
-rw-r--r-- | tests/bugs172/pr398246/Code4.java | 21 | ||||
-rw-r--r-- | tests/bugs172/pr398246/CodeExtra4.java | 11 |
5 files changed, 92 insertions, 0 deletions
diff --git a/tests/bugs172/pr398246/Code.java b/tests/bugs172/pr398246/Code.java new file mode 100644 index 000000000..beacd74b4 --- /dev/null +++ b/tests/bugs172/pr398246/Code.java @@ -0,0 +1,19 @@ +import org.aspectj.lang.annotation.control.*; +import java.lang.annotation.*; + +public class Code { + public static boolean isTrue = true; + + public void m() { + } + public static void main(String []argv) { + new Code().m(); + } +} + +aspect X { + @CodeGenerationHint(ifNameSuffix="andy") + before(): execution(* Code.*(..)) && if(Code.isTrue) { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/Code2.java b/tests/bugs172/pr398246/Code2.java new file mode 100644 index 000000000..c8c0baafb --- /dev/null +++ b/tests/bugs172/pr398246/Code2.java @@ -0,0 +1,20 @@ +import org.aspectj.lang.annotation.control.*; +import java.lang.annotation.*; + +public class Code2 { + public static boolean isTrue = true; + + public void m() { + } + public static void main(String []argv) { + new Code2().m(); + } +} + +aspect X { + @CodeGenerationHint(ifNameSuffix="fred") + pointcut p(): execution(* Code2.*(..)) && if(Code2.isTrue); + before(): p() { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/Code3.java b/tests/bugs172/pr398246/Code3.java new file mode 100644 index 000000000..5588905f1 --- /dev/null +++ b/tests/bugs172/pr398246/Code3.java @@ -0,0 +1,21 @@ +import java.lang.annotation.*; + +public class Code3 { + public static boolean isTrue = true; + + public void m() { + } + public static void main(String []argv) { + new Code3().m(); + } +} + +aspect X { + + @org.aspectj.lang.annotation.control.CodeGenerationHint(ifNameSuffix="barney") + pointcut p(): execution(* Code3.*(..)) && if(Code3.isTrue); + + before(): p() { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/Code4.java b/tests/bugs172/pr398246/Code4.java new file mode 100644 index 000000000..488092d93 --- /dev/null +++ b/tests/bugs172/pr398246/Code4.java @@ -0,0 +1,21 @@ +import java.lang.annotation.*; + +public class Code4 { + public static boolean isTrue = true; + + public void m() { + } + public static void main(String []argv) { + new Code4().m(); + } +} + +aspect X { + + @org.aspectj.lang.annotation.control.CodeGenerationHint(ifNameSuffix="sid") + pointcut p(): execution(* Code*.*(..)) && if(Code4.isTrue); + + before(): p() { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/CodeExtra4.java b/tests/bugs172/pr398246/CodeExtra4.java new file mode 100644 index 000000000..e192328d6 --- /dev/null +++ b/tests/bugs172/pr398246/CodeExtra4.java @@ -0,0 +1,11 @@ +import java.lang.annotation.*; + +public class CodeExtra4 { + public static boolean isTrue = true; + + public void m() { } + + public static void main(String []argv) { + new CodeExtra4().m(); + } +} |