From: aclement Date: Wed, 28 Jan 2009 00:16:28 +0000 (+0000) Subject: refactoring to make around advice lvt fixes easier to apply - and make the code a... X-Git-Tag: pre268419~196 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f9ea945477d7a3649e99c583a25adc49ac117d36;p=aspectj.git refactoring to make around advice lvt fixes easier to apply - and make the code a bit clearer --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java b/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java index 5da734a62..1902e0e6c 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java @@ -306,8 +306,8 @@ public class NameMangler { return makeName("cflowCounter", Integer.toHexString(xcut.getCflowEntries().size())); } - public static String makeClosureClassName(UnresolvedType enclosingType, int index) { - return enclosingType.getName() + "$AjcClosure" + index; + public static String makeClosureClassName(UnresolvedType enclosingType, String suffix) { + return enclosingType.getName() + "$AjcClosure" + suffix; } public static String aroundCallbackMethodName(Member shadowSig, String suffixTag) { @@ -316,6 +316,12 @@ public class NameMangler { return ret.toString(); } + public static String aroundAdviceMethodName(Member shadowSig, String suffixTag) { + StringBuffer ret = new StringBuffer(); + ret.append(getExtractableName(shadowSig)).append("_aroundBody").append(suffixTag).append("$advice"); + return ret.toString(); + } + public static String getExtractableName(Member shadowSignature) { String name = shadowSignature.getName(); MemberKind kind = shadowSignature.getKind();