From f9ea945477d7a3649e99c583a25adc49ac117d36 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 28 Jan 2009 00:16:28 +0000 Subject: [PATCH] refactoring to make around advice lvt fixes easier to apply - and make the code a bit clearer --- .../src/org/aspectj/weaver/NameMangler.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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(); -- 2.39.5