aboutsummaryrefslogtreecommitdiffstats
path: root/tests/multiIncremental/pr265729_lib
diff options
context:
space:
mode:
authoraclement <aclement>2009-02-24 20:27:41 +0000
committeraclement <aclement>2009-02-24 20:27:41 +0000
commit11e7c2ef992f4b26a7839a06594b5cc6139221a8 (patch)
treea9553893d8fd3c5b3948772b42be6d313d150dac /tests/multiIncremental/pr265729_lib
parent51e641f10a044a0e394f6bac3e906494c46dd67f (diff)
downloadaspectj-11e7c2ef992f4b26a7839a06594b5cc6139221a8.tar.gz
aspectj-11e7c2ef992f4b26a7839a06594b5cc6139221a8.zip
265729: testcode
Diffstat (limited to 'tests/multiIncremental/pr265729_lib')
-rw-r--r--tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/App.java16
-rw-r--r--tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/InterTypeAspectSupport.java12
-rw-r--r--tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/EnforceLogging.aj16
-rw-r--r--tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/InterTypeAspect.aj16
4 files changed, 60 insertions, 0 deletions
diff --git a/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/App.java b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/App.java
new file mode 100644
index 000000000..a49827673
--- /dev/null
+++ b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/App.java
@@ -0,0 +1,16 @@
+package be.cronos.aop;
+
+import be.cronos.aop.InterTypeAspectSupport;
+
+@InterTypeAspectSupport
+public class App
+{
+ public static void main( String[] args )
+ {
+ //System.out.println( "Hello World!" ); //should throw compiler error, OK
+ App app = new App();
+ app.foo(42);
+
+
+ }
+}
diff --git a/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/InterTypeAspectSupport.java b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/InterTypeAspectSupport.java
new file mode 100644
index 000000000..e73cc30d5
--- /dev/null
+++ b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/InterTypeAspectSupport.java
@@ -0,0 +1,12 @@
+package be.cronos.aop;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface InterTypeAspectSupport {
+
+}
diff --git a/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/EnforceLogging.aj b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/EnforceLogging.aj
new file mode 100644
index 000000000..ee00366d7
--- /dev/null
+++ b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/EnforceLogging.aj
@@ -0,0 +1,16 @@
+package be.cronos.aop.aspects;
+
+//import junit.framework.TestCase;
+
+public aspect EnforceLogging {
+ pointcut scope():
+ !within(*TestCase+);
+
+ pointcut printing():
+ get(* System.out) || get(* System.err) || call(* printStackTrace());
+
+ declare error
+ : scope() && printing()
+ : "Don't print to Console, use logger";
+
+}
diff --git a/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/InterTypeAspect.aj b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/InterTypeAspect.aj
new file mode 100644
index 000000000..39c3ae769
--- /dev/null
+++ b/tests/multiIncremental/pr265729_lib/base/src/be/cronos/aop/aspects/InterTypeAspect.aj
@@ -0,0 +1,16 @@
+package be.cronos.aop.aspects;
+
+import be.cronos.aop.InterTypeAspectSupport;
+
+public aspect InterTypeAspect {
+
+ public interface InterTypeAspectInterface {
+ }
+
+ declare parents : (@InterTypeAspectSupport *) implements InterTypeAspectInterface;
+
+ public String InterTypeAspectInterface.foo(int i) {
+ return "bar";
+ }
+
+}