From: aclement Date: Tue, 19 Jan 2010 18:47:50 +0000 (+0000) Subject: tagged old style name creators X-Git-Tag: V1_6_9M1~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=677a140584013888455e82df655ff3db06c2e507;p=aspectj.git tagged old style name creators --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java b/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java index 201fd352d..f9162684a 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/NameMangler.java @@ -113,10 +113,20 @@ public class NameMangler { return makeName("privMethod", aspectType.getNameAsIdentifier(), objectType.getNameAsIdentifier(), name); } + /** + * Create the old style (<1.6.9) format getter name which includes the aspect requesting access and the type containing the + * field in the name of the type. At 1.6.9 and above the name is simply ajc$get$ + */ public static String privilegedAccessMethodForFieldGet(String name, UnresolvedType objectType, UnresolvedType aspectType) { - return makeName("privFieldGet", aspectType.getNameAsIdentifier(), objectType.getNameAsIdentifier(), name); + StringBuilder nameBuilder = new StringBuilder(); + nameBuilder.append(makeName("privFieldGet", aspectType.getNameAsIdentifier(), objectType.getNameAsIdentifier(), name)); + return nameBuilder.toString(); } + /** + * Create the old style (<1.6.9) format setter name which includes the aspect requesting access and the type containing the + * field in the name of the type. At 1.6.9 and above the name is simply ajc$set$ + */ public static String privilegedAccessMethodForFieldSet(String name, UnresolvedType objectType, UnresolvedType aspectType) { return makeName("privFieldSet", aspectType.getNameAsIdentifier(), objectType.getNameAsIdentifier(), name); } @@ -185,7 +195,7 @@ public class NameMangler { if (Modifier.isPublic(modifiers)) { return name; } - // ??? might want to handle case where aspect and class are in same package similar to public + // // ??? might want to handle case where aspect and class are in same package similar to public return makeName("interField", makeVisibilityName(modifiers, aspectType), name); }