diff options
author | aclement <aclement> | 2005-03-10 17:33:04 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-03-10 17:33:04 +0000 |
commit | 33dcd66fe02a31b28a01ae6a1a3c7f83082c8f97 (patch) | |
tree | fa53874a7bc75f80b17ea9d87df04191273d5b20 /weaver | |
parent | 8ef6f44f170c728557892b32d242dcbf5c8dec28 (diff) | |
download | aspectj-33dcd66fe02a31b28a01ae6a1a3c7f83082c8f97.tar.gz aspectj-33dcd66fe02a31b28a01ae6a1a3c7f83082c8f97.zip |
Declare annotation: modified to take account of new AnnotationX stuff
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/Utility.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/Utility.java b/weaver/src/org/aspectj/weaver/bcel/Utility.java index ee47c67a6..68f2ef2b1 100644 --- a/weaver/src/org/aspectj/weaver/bcel/Utility.java +++ b/weaver/src/org/aspectj/weaver/bcel/Utility.java @@ -25,7 +25,6 @@ import org.aspectj.apache.bcel.Constants; import org.aspectj.apache.bcel.classfile.ClassParser; import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.apache.bcel.classfile.Method; -import org.aspectj.apache.bcel.classfile.annotation.Annotation; import org.aspectj.apache.bcel.classfile.annotation.ArrayElementValue; import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePair; import org.aspectj.apache.bcel.classfile.annotation.ElementValue; @@ -50,6 +49,7 @@ import org.aspectj.apache.bcel.generic.SWITCH; import org.aspectj.apache.bcel.generic.Select; import org.aspectj.apache.bcel.generic.TargetLostException; import org.aspectj.apache.bcel.generic.Type; +import org.aspectj.weaver.AnnotationX; import org.aspectj.weaver.BCException; import org.aspectj.weaver.Member; import org.aspectj.weaver.ResolvedTypeX; @@ -615,16 +615,17 @@ public class Utility { * by its key) should be ignored. * */ - public static boolean isSuppressing(Annotation[] anns,String lintkey) { + public static boolean isSuppressing(AnnotationX[] anns,String lintkey) { + if (anns == null) return false; boolean suppressed = false; // Go through the annotation types on the advice for (int i = 0;!suppressed && i<anns.length;i++) { // Check for the SuppressAjWarnings annotation - if (TypeX.SUPPRESS_AJ_WARNINGS.getSignature().equals(anns[i].getTypeSignature())) { + if (TypeX.SUPPRESS_AJ_WARNINGS.getSignature().equals(anns[i].getBcelAnnotation().getTypeSignature())) { // Two possibilities: // 1. there are no values specified (i.e. @SuppressAjWarnings) // 2. there are values specified (i.e. @SuppressAjWarnings("A") or @SuppressAjWarnings({"A","B"}) - List vals = anns[i].getValues(); + List vals = anns[i].getBcelAnnotation().getValues(); if (vals == null || vals.size()==0) { // (1) suppressed = true; } else { // (2) |