diff options
author | aclement <aclement> | 2009-08-10 18:13:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-08-10 18:13:36 +0000 |
commit | aa46c1d72c1218a318087e1b93ec430af02b3a84 (patch) | |
tree | 4a979fead0becdd14f49e355f7774bb2a64fbad1 /tests/bugs166 | |
parent | dd7d87923f6f8e6ccdc3e387679ba5a3c70550ac (diff) | |
download | aspectj-aa46c1d72c1218a318087e1b93ec430af02b3a84.tar.gz aspectj-aa46c1d72c1218a318087e1b93ec430af02b3a84.zip |
284862: test and fix
Diffstat (limited to 'tests/bugs166')
-rw-r--r-- | tests/bugs166/pr284862/AnnotatedMethodImpl.aj | 9 | ||||
-rw-r--r-- | tests/bugs166/pr284862/AnnotatedMethodInterface.java | 6 | ||||
-rw-r--r-- | tests/bugs166/pr284862/AspectToMatch.aj | 29 | ||||
-rw-r--r-- | tests/bugs166/pr284862/Entity.java | 11 | ||||
-rw-r--r-- | tests/bugs166/pr284862/EntityClass.java | 5 | ||||
-rw-r--r-- | tests/bugs166/pr284862/InterfaceToAdd.java | 1 | ||||
-rw-r--r-- | tests/bugs166/pr284862/PresentAnnotation.java | 11 | ||||
-rw-r--r-- | tests/bugs166/pr284862/SearchAnnotation.java | 11 |
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 { + +} |