summaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authoraclement <aclement>2011-11-17 18:16:00 +0000
committeraclement <aclement>2011-11-17 18:16:00 +0000
commitfc7ad6de88c19c4e39d72a7c92f65aafb2e86484 (patch)
tree6cd46c8e18d0d8f249b3deb5adcdb7bfc510261e /org.aspectj.matcher
parent49e0427bb885251ed491c5e243f2f5995149f57f (diff)
downloadaspectj-fc7ad6de88c19c4e39d72a7c92f65aafb2e86484.tar.gz
aspectj-fc7ad6de88c19c4e39d72a7c92f65aafb2e86484.zip
363979
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
index 2acd01690..401fc55d7 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java
@@ -18,6 +18,7 @@ import java.util.Set;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.util.FuzzyBoolean;
+import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
import org.aspectj.weaver.AnnotatedElement;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.CompressingDataOutputStream;
@@ -28,7 +29,6 @@ import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.VersionedDataInputStream;
import org.aspectj.weaver.WeaverMessages;
import org.aspectj.weaver.World;
-import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
/**
* @author colyer
@@ -206,7 +206,24 @@ public class WildAnnotationTypePattern extends AnnotationTypePattern {
}
annotationValues.put(k, rt.getSignature());
} else {
- throw new RuntimeException("Compiler limitation: annotation value support not implemented for type " + t);
+ if (t.isAnnotation()) {
+ if (v.indexOf("(") != -1) {
+ throw new RuntimeException(
+ "Compiler limitation: annotation values can only currently be marker annotations (no values): "
+ + v);
+ }
+ String typename = v.substring(1);
+ ResolvedType rt = scope.lookupType(typename, this).resolve(scope.getWorld());
+ if (rt.isMissing()) {
+ IMessage m = MessageUtil.error(
+ "Unable to resolve type '" + v + "' specified for value '" + k + "'", getSourceLocation());
+ scope.getWorld().getMessageHandler().handleMessage(m);
+ }
+ annotationValues.put(k, rt.getSignature());
+ } else {
+ throw new RuntimeException("Compiler limitation: annotation value support not implemented for type "
+ + t);
+ }
}
}
}