aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2010-11-25 21:46:31 +0000
committeraclement <aclement>2010-11-25 21:46:31 +0000
commitea9cfb2f1619e40f708cbd596495e68c1d0b8d8f (patch)
tree08a89279247b4ebb19c7c1c7e9401a3b4c35e017 /asm
parentaffd2cc672dc4463e8be4abf8329b0d14a9d0581 (diff)
downloadaspectj-ea9cfb2f1619e40f708cbd596495e68c1d0b8d8f.tar.gz
aspectj-ea9cfb2f1619e40f708cbd596495e68c1d0b8d8f.zip
annotation removal program element support
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/IProgramElement.java6
-rw-r--r--asm/src/org/aspectj/asm/internal/HandleProviderDelimiter.java7
-rw-r--r--asm/src/org/aspectj/asm/internal/ProgramElement.java34
3 files changed, 40 insertions, 7 deletions
diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java
index 0413267e1..96dedb2b2 100644
--- a/asm/src/org/aspectj/asm/IProgramElement.java
+++ b/asm/src/org/aspectj/asm/IProgramElement.java
@@ -433,6 +433,8 @@ public interface IProgramElement extends Serializable {
*/
public String getAnnotationType();
+ public String[] getRemovedAnnotationTypes();
+
public Map<String, List<String>> getDeclareParentsMap();
public void setDeclareParentsMap(Map<String, List<String>> newmap);
@@ -440,4 +442,8 @@ public interface IProgramElement extends Serializable {
public void addFullyQualifiedName(String fqname);
public String getFullyQualifiedName();
+
+ public void setAnnotationRemover(boolean isRemover);
+
+ public boolean isAnnotationRemover();
} \ No newline at end of file
diff --git a/asm/src/org/aspectj/asm/internal/HandleProviderDelimiter.java b/asm/src/org/aspectj/asm/internal/HandleProviderDelimiter.java
index 164cc23f7..9bbfc307c 100644
--- a/asm/src/org/aspectj/asm/internal/HandleProviderDelimiter.java
+++ b/asm/src/org/aspectj/asm/internal/HandleProviderDelimiter.java
@@ -29,11 +29,10 @@ public class HandleProviderDelimiter {
public static final HandleProviderDelimiter IMPORTDECLARATION = new HandleProviderDelimiter('#');
public static final HandleProviderDelimiter COUNT = new HandleProviderDelimiter('!');
public static final HandleProviderDelimiter ESCAPE = new HandleProviderDelimiter('\\');
+ public static final HandleProviderDelimiter PACKAGEDECLARATION = new HandleProviderDelimiter('%');
+ public static final HandleProviderDelimiter PACKAGEFRAGMENTROOT = new HandleProviderDelimiter('/');
// these below are not currently used because no iprogramelement.kind
// equivalent
- public static final HandleProviderDelimiter PACKAGEFRAGMENTROOT = new HandleProviderDelimiter('/');
- public static final HandleProviderDelimiter PACKAGEDECLARATION = new HandleProviderDelimiter('%'); // now
- // used
public static final HandleProviderDelimiter LOCALVARIABLE = new HandleProviderDelimiter('@');
public static final HandleProviderDelimiter TYPE_PARAMETER = new HandleProviderDelimiter(']');
@@ -47,7 +46,7 @@ public class HandleProviderDelimiter {
public static final HandleProviderDelimiter DECLARE = new HandleProviderDelimiter('`');
public static final HandleProviderDelimiter POINTCUT = new HandleProviderDelimiter('"');
- public static final HandleProviderDelimiter PHANTOM = new HandleProviderDelimiter(',');
+ public static final HandleProviderDelimiter PHANTOM = new HandleProviderDelimiter(';');
private static char empty = ' ';
private final char delim;
diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java
index f5a853a8c..bf7eb7f4b 100644
--- a/asm/src/org/aspectj/asm/internal/ProgramElement.java
+++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java
@@ -344,13 +344,41 @@ public class ProgramElement implements IProgramElement {
kvpairs.put("annotationType", fullyQualifiedAnnotationType);
}
- /**
- * {@inheritDoc}
- */
+ public void setAnnotationRemover(boolean isRemover) {
+ fixMap();
+ kvpairs.put("annotationRemover", isRemover);
+ }
+
public String getAnnotationType() {
+ if (isAnnotationRemover()) {
+ return null;
+ }
return (String) (kvpairs == null ? null : kvpairs.get("annotationType"));
}
+ public boolean isAnnotationRemover() {
+ if (kvpairs == null) {
+ return false;
+ }
+ Boolean b = (Boolean) kvpairs.get("annotationRemover");
+ if (b == null) {
+ return false;
+ }
+ return b.booleanValue();
+ }
+
+ public String[] getRemovedAnnotationTypes() {
+ if (!isAnnotationRemover()) {
+ return null;
+ }
+ String annotype = (String) (kvpairs == null ? null : kvpairs.get("annotationType"));
+ if (annotype == null) {
+ return null;
+ } else {
+ return new String[] { annotype };
+ }
+ }
+
public String getCorrespondingType() {
return getCorrespondingType(false);
}