]> source.dussan.org Git - aspectj.git/commitdiff
refactoring to make around advice lvt fixes easier to apply - and make the code a...
authoraclement <aclement>
Wed, 28 Jan 2009 00:16:28 +0000 (00:16 +0000)
committeraclement <aclement>
Wed, 28 Jan 2009 00:16:28 +0000 (00:16 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java

index 5da734a6239e36385acf1b7ab21a6e2e0a24956d..1902e0e6cdb995228109dc718cd28fbd447d7230 100644 (file)
@@ -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();