]> source.dussan.org Git - aspectj.git/commitdiff
329111
authoraclement <aclement>
Sun, 31 Oct 2010 04:34:43 +0000 (04:34 +0000)
committeraclement <aclement>
Sun, 31 Oct 2010 04:34:43 +0000 (04:34 +0000)
asm/src/org/aspectj/asm/IProgramElement.java
asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java

index 46d4f9ad832138c4871c0c479a09dcc98ac9e0a7..0413267e12ffefcd7c20461fb6b93a87926cadd9 100644 (file)
@@ -393,6 +393,18 @@ public interface IProgramElement extends Serializable {
                        return name.startsWith("declare soft");
                }
 
+               public boolean isDeclareWarning() {
+                       return name.startsWith("declare warning");
+               }
+
+               public boolean isDeclareError() {
+                       return name.startsWith("declare error");
+               }
+
+               public boolean isDeclarePrecedence() {
+                       return name.startsWith("declare precedence");
+               }
+
                // The 4 declarations below are necessary for serialization
                private static int nextOrdinal = 0;
                private final int ordinal = nextOrdinal++;
index 2499b5159662f72b209332d990bda0a3f7d71341..3751dfc1b4d4fc6ec1ab76adb6442ad6701d562d 100644 (file)
@@ -186,22 +186,12 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
                        if (count > 1) {
                                return CharOperation.concat(countDelim, new Integer(count).toString().toCharArray());
                        }
-               } else if (ipe.getKind().isDeclareAnnotation()) {
-                       int count = computeCountBasedOnPeers(ipe);
-                       if (count > 1) {
-                               return CharOperation.concat(countDelim, new Integer(count).toString().toCharArray());
-                       }
-               } else if (ipe.getKind().isDeclareSoft()) {
-                       // look at peer declares
+               } else if (ipe.getKind().isDeclare()) {
+                       // // look at peer declares
                        int count = computeCountBasedOnPeers(ipe);
                        if (count > 1) {
                                return CharOperation.concat(countDelim, new Integer(count).toString().toCharArray());
                        }
-               } else if (ipe.getKind().isDeclare()) {
-                       int index = CharOperation.lastIndexOf('_', byteCodeName);
-                       if (index != -1) {
-                               return convertCount(CharOperation.subarray(byteCodeName, index + 1, byteCodeName.length));
-                       }
                } else if (ipe.getKind().equals(IProgramElement.Kind.ADVICE)) {
                        // Look at any peer advice
                        int count = 1;