From c1ba48332b7fd500574910e9633a883295cc3402 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 18 Aug 2010 17:01:33 +0000 Subject: source locations for declare annos (not persisted) and fqname of handles for itds --- asm/src/org/aspectj/asm/IProgramElement.java | 4 ++++ asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java | 7 ++++++- asm/src/org/aspectj/asm/internal/ProgramElement.java | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'asm') diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java index ccf59247f..eedffc3a2 100644 --- a/asm/src/org/aspectj/asm/IProgramElement.java +++ b/asm/src/org/aspectj/asm/IProgramElement.java @@ -419,4 +419,8 @@ public interface IProgramElement extends Serializable { public Map> getDeclareParentsMap(); public void setDeclareParentsMap(Map> newmap); + + public void addFullyQualifiedName(String fqname); + + public String getFullyQualifiedName(); } \ No newline at end of file diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java index bcf8fbf49..7a38eafb5 100644 --- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java +++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java @@ -109,7 +109,12 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { // escape the @ (pr249216c9) handle.append("declare \\@").append(ipe.getName().substring(9)).append(getParameters(ipe)); } else { - handle.append(ipe.getName()).append(getParameters(ipe)); + if (ipe.getFullyQualifiedName() != null) { + handle.append(ipe.getFullyQualifiedName()); + } else { + handle.append(ipe.getName()); + } + handle.append(getParameters(ipe)); } } // } diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java index 1462449b7..8193acf6d 100644 --- a/asm/src/org/aspectj/asm/internal/ProgramElement.java +++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java @@ -677,4 +677,13 @@ public class ProgramElement implements IProgramElement { public void setDeclareParentsMap(Map> newmap) { kvpairs.put("declareparentsmap", newmap); } + + public void addFullyQualifiedName(String fqname) { + fixMap(); + kvpairs.put("itdfqname", fqname); + } + + public String getFullyQualifiedName() { + return (String) kvpairs.get("itdfqname"); + } } -- cgit v1.2.3