@@ -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(); | |||
} |
@@ -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; |
@@ -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); | |||
} |