aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs166
diff options
context:
space:
mode:
authoraclement <aclement>2009-08-10 18:13:36 +0000
committeraclement <aclement>2009-08-10 18:13:36 +0000
commitaa46c1d72c1218a318087e1b93ec430af02b3a84 (patch)
tree4a979fead0becdd14f49e355f7774bb2a64fbad1 /tests/bugs166
parentdd7d87923f6f8e6ccdc3e387679ba5a3c70550ac (diff)
downloadaspectj-aa46c1d72c1218a318087e1b93ec430af02b3a84.tar.gz
aspectj-aa46c1d72c1218a318087e1b93ec430af02b3a84.zip
284862: test and fix
Diffstat (limited to 'tests/bugs166')
-rw-r--r--tests/bugs166/pr284862/AnnotatedMethodImpl.aj9
-rw-r--r--tests/bugs166/pr284862/AnnotatedMethodInterface.java6
-rw-r--r--tests/bugs166/pr284862/AspectToMatch.aj29
-rw-r--r--tests/bugs166/pr284862/Entity.java11
-rw-r--r--tests/bugs166/pr284862/EntityClass.java5
-rw-r--r--tests/bugs166/pr284862/InterfaceToAdd.java1
-rw-r--r--tests/bugs166/pr284862/PresentAnnotation.java11
-rw-r--r--tests/bugs166/pr284862/SearchAnnotation.java11
8 files changed, 83 insertions, 0 deletions
diff --git a/tests/bugs166/pr284862/AnnotatedMethodImpl.aj b/tests/bugs166/pr284862/AnnotatedMethodImpl.aj
new file mode 100644
index 000000000..0bbe39b4c
--- /dev/null
+++ b/tests/bugs166/pr284862/AnnotatedMethodImpl.aj
@@ -0,0 +1,9 @@
+
+public aspect AnnotatedMethodImpl {
+
+ @PresentAnnotation
+ public String AnnotatedMethodInterface.getSomething() {
+ return "meth";
+ }
+
+}
diff --git a/tests/bugs166/pr284862/AnnotatedMethodInterface.java b/tests/bugs166/pr284862/AnnotatedMethodInterface.java
new file mode 100644
index 000000000..c2d135e8d
--- /dev/null
+++ b/tests/bugs166/pr284862/AnnotatedMethodInterface.java
@@ -0,0 +1,6 @@
+
+public interface AnnotatedMethodInterface {
+
+ @PresentAnnotation
+ public String getSomething();
+}
diff --git a/tests/bugs166/pr284862/AspectToMatch.aj b/tests/bugs166/pr284862/AspectToMatch.aj
new file mode 100644
index 000000000..04f88deef
--- /dev/null
+++ b/tests/bugs166/pr284862/AspectToMatch.aj
@@ -0,0 +1,29 @@
+
+public aspect AspectToMatch {
+
+ //declare parents : ((@Entity *) && !hasmethod(@SearchAnnotation public * get*()) && !hasfield(@SearchAnnotations * *)) implements InterfaceToAdd;
+ declare parents : ((@Entity *) && !hasmethod(@SearchAnnotation public * get*()) &&
+ !hasfield(@SearchAnnotation * *)) implements InterfaceToAdd;
+
+ /*
+ declare warning :
+ staticinitialization(
+ !hasmethod(* getMamma())
+ ) : "Not found";
+ */
+ /*
+ before() : handler(
+ (@Entity *) && !(hasmethod(@SearchAnnotation public * get*())) && !(hasfield(@SearchAnnotations * *))
+ ) {
+
+
+ }
+ */
+
+ /*
+ before() : execution(!@(org.aspectj.bug*) public * get*()) {
+
+ }
+ */
+
+}
diff --git a/tests/bugs166/pr284862/Entity.java b/tests/bugs166/pr284862/Entity.java
new file mode 100644
index 000000000..a1dbfa035
--- /dev/null
+++ b/tests/bugs166/pr284862/Entity.java
@@ -0,0 +1,11 @@
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Entity {
+
+}
diff --git a/tests/bugs166/pr284862/EntityClass.java b/tests/bugs166/pr284862/EntityClass.java
new file mode 100644
index 000000000..e87f3f50c
--- /dev/null
+++ b/tests/bugs166/pr284862/EntityClass.java
@@ -0,0 +1,5 @@
+
+@Entity
+public class EntityClass implements AnnotatedMethodInterface {
+
+}
diff --git a/tests/bugs166/pr284862/InterfaceToAdd.java b/tests/bugs166/pr284862/InterfaceToAdd.java
new file mode 100644
index 000000000..8d9192bc4
--- /dev/null
+++ b/tests/bugs166/pr284862/InterfaceToAdd.java
@@ -0,0 +1 @@
+interface InterfaceToAdd {}
diff --git a/tests/bugs166/pr284862/PresentAnnotation.java b/tests/bugs166/pr284862/PresentAnnotation.java
new file mode 100644
index 000000000..5795876cc
--- /dev/null
+++ b/tests/bugs166/pr284862/PresentAnnotation.java
@@ -0,0 +1,11 @@
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PresentAnnotation {
+
+}
diff --git a/tests/bugs166/pr284862/SearchAnnotation.java b/tests/bugs166/pr284862/SearchAnnotation.java
new file mode 100644
index 000000000..1f913a342
--- /dev/null
+++ b/tests/bugs166/pr284862/SearchAnnotation.java
@@ -0,0 +1,11 @@
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+//@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SearchAnnotation {
+
+}