aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher/src
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2013-04-03 12:58:01 -0700
committerAndy Clement <andrew.clement@gmail.com>2013-04-03 12:58:01 -0700
commitd6e95662492576829120f61c096b5fc1af5bd269 (patch)
tree2dc3a170058d12b0b3d311b8b812119ab8595ef4 /org.aspectj.matcher/src
parentff0859d6f529a17c851dd774488ee7b0ca8391d3 (diff)
downloadaspectj-d6e95662492576829120f61c096b5fc1af5bd269.tar.gz
aspectj-d6e95662492576829120f61c096b5fc1af5bd269.zip
fixed 404848
Diffstat (limited to 'org.aspectj.matcher/src')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMember.java2
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java23
2 files changed, 22 insertions, 3 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMember.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMember.java
index 60d322410..0b5def29a 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMember.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMember.java
@@ -153,4 +153,6 @@ public interface ResolvedMember extends Member, AnnotatedElement, TypeVariableDe
public boolean isDefaultConstructor();
+ public void setAnnotations(AnnotationAJ[] annotations);
+
} \ No newline at end of file
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java
index 6ddf51bb5..cfd0508c4 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java
@@ -321,9 +321,29 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso
if (backingGenericMember != null) {
return backingGenericMember.getAnnotations();
}
+ if (annotations!=null) {
+ return annotations;
+ }
return super.getAnnotations();
}
+ public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) {
+ if (annotations!=null) {
+ // this means they have been set (we are likely a placeholder for an ITD, so a fake member)
+ for (AnnotationAJ annotation: annotations) {
+ if (annotation.getType().equals(ofType)) {
+ return annotation;
+ }
+ }
+ return null;
+ }
+ throw new UnsupportedOperationException("You should resolve this member and call getAnnotationOfType() on the result...");
+ }
+
+ public void setAnnotations(AnnotationAJ[] annotations) {
+ this.annotations = annotations;
+ }
+
public void setAnnotationTypes(ResolvedType[] annotationTypes) {
this.annotationTypes = annotationTypes;
}
@@ -1235,9 +1255,6 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Reso
public void evictWeavingState() {
}
- public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) {
- throw new UnsupportedOperationException("You should resolve this member and call getAnnotationOfType() on the result...");
- }
public boolean isEquivalentTo(Object other) {
return this.equals(other);