aboutsummaryrefslogtreecommitdiffstats
path: root/asm/src
diff options
context:
space:
mode:
authoraclement <aclement>2010-10-31 04:34:43 +0000
committeraclement <aclement>2010-10-31 04:34:43 +0000
commitab0c79c20898a5d0c19fd6e054561a3c55158f10 (patch)
treed9cae35d72fc0db14e77bde2f5a9e92f0a005736 /asm/src
parentf7591388d9bf2cd4edb9a450ca690e4e82be5319 (diff)
downloadaspectj-ab0c79c20898a5d0c19fd6e054561a3c55158f10.tar.gz
aspectj-ab0c79c20898a5d0c19fd6e054561a3c55158f10.zip
329111
Diffstat (limited to 'asm/src')
-rw-r--r--asm/src/org/aspectj/asm/IProgramElement.java12
-rw-r--r--asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java14
2 files changed, 14 insertions, 12 deletions
diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java
index 46d4f9ad8..0413267e1 100644
--- a/asm/src/org/aspectj/asm/IProgramElement.java
+++ b/asm/src/org/aspectj/asm/IProgramElement.java
@@ -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++;
diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
index 2499b5159..3751dfc1b 100644
--- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -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;