aboutsummaryrefslogtreecommitdiffstats
path: root/asm/src
diff options
context:
space:
mode:
authoraclement <aclement>2006-01-26 15:32:48 +0000
committeraclement <aclement>2006-01-26 15:32:48 +0000
commit7e40a6094541d2191f09d810b3330c4858ed8952 (patch)
tree777d77096a21f53726ea5d2ea2794d6d2648cd34 /asm/src
parent027fe98f13c245e89cc57876dea418d70bff50cb (diff)
downloadaspectj-7e40a6094541d2191f09d810b3330c4858ed8952.tar.gz
aspectj-7e40a6094541d2191f09d810b3330c4858ed8952.zip
helens changes for 125295 - should keep AJDT happy.
Diffstat (limited to 'asm/src')
-rw-r--r--asm/src/org/aspectj/asm/IProgramElement.java3
-rw-r--r--asm/src/org/aspectj/asm/internal/ProgramElement.java35
2 files changed, 31 insertions, 7 deletions
diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java
index 8223c176b..b7ef7e27f 100644
--- a/asm/src/org/aspectj/asm/IProgramElement.java
+++ b/asm/src/org/aspectj/asm/IProgramElement.java
@@ -79,6 +79,7 @@ public interface IProgramElement extends Serializable {
public String getCorrespondingType(boolean getFullyQualifiedType);
public String toSignatureString();
+ public String toSignatureString(boolean getFullyQualifiedArgTypes);
public void setRunnable(boolean value);
public boolean isRunnable();
@@ -107,11 +108,13 @@ public interface IProgramElement extends Serializable {
* Includes information about the origin of the node.
*/
public String toLinkLabelString();
+ public String toLinkLabelString(boolean getFullyQualifiedArgTypes);
/**
* Includes name, parameter types (if any) and details (if any).
*/
public String toLabelString();
+ public String toLabelString(boolean getFullyQualifiedArgTypes);
public List getParameterTypes();
public void setParameterTypes(List list);
diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java
index 0c7c8683c..a523b7497 100644
--- a/asm/src/org/aspectj/asm/internal/ProgramElement.java
+++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java
@@ -387,21 +387,34 @@ public class ProgramElement implements IProgramElement {
}
public String toSignatureString() {
+ return toSignatureString(true);
+ }
+
+ public String toSignatureString(boolean getFullyQualifiedArgTypes) {
StringBuffer sb = new StringBuffer();
sb.append(name);
if (parameterTypes != null ) {
sb.append('(');
for (Iterator it = parameterTypes.iterator(); it.hasNext(); ) {
- sb.append((String)it.next());
+ String arg = (String)it.next();
+ if (getFullyQualifiedArgTypes) {
+ sb.append(arg);
+ } else {
+ int index = arg.lastIndexOf(".");
+ if (index != -1) {
+ sb.append(arg.substring(index + 1));
+ } else {
+ sb.append(arg);
+ }
+ }
if (it.hasNext()) sb.append(", ");
}
sb.append(')');
}
- return sb.toString();
+ return sb.toString();
}
-
public static boolean shortITDNames = true;
@@ -409,6 +422,10 @@ public class ProgramElement implements IProgramElement {
* TODO: move the "parent != null"==>injar heuristic to more explicit
*/
public String toLinkLabelString() {
+ return toLinkLabelString(true);
+ }
+
+ public String toLinkLabelString(boolean getFullyQualifiedArgTypes) {
String label;
if (kind == Kind.CODE || kind == Kind.INITIALIZER) {
label = parent.getParent().getName() + ": ";
@@ -435,18 +452,22 @@ public class ProgramElement implements IProgramElement {
label = "injar aspect: ";
}
}
- label += toLabelString();
+ label += toLabelString(getFullyQualifiedArgTypes);
return label;
}
-
+
public String toLabelString() {
- String label = toSignatureString();
+ return toLabelString(true);
+ }
+
+ public String toLabelString(boolean getFullyQualifiedArgTypes) {
+ String label = toSignatureString(getFullyQualifiedArgTypes);
if (details != null) {
label += ": " + details;
}
return label;
}
-
+
private String handle = null;
public String getHandleIdentifier() {
if (null == handle) {