From d96d5988ff8719eddc7047ed4015e477b534cdc9 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 26 Jun 2009 16:16:45 +0000 Subject: [PATCH] field host for mixin made synthetic --- weaver/src/org/aspectj/weaver/bcel/BcelField.java | 2 +- weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelField.java b/weaver/src/org/aspectj/weaver/bcel/BcelField.java index 02da37b90..de914f764 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelField.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelField.java @@ -37,7 +37,7 @@ import org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.GenericSigna final class BcelField extends ResolvedMemberImpl { - private static int AccSynthetic = 0x1000; + public static int AccSynthetic = 0x1000; private Field field; private boolean isAjSynthetic; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index c969fe84d..5c46ea24e 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -1146,7 +1146,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { * @param unMangledInterMethod the method to bridge 'to' that we have already created in the 'subtype' * @param clazz the class in which to put the bridge method * @param paramTypes Parameter types for the bridge method, passed in as an optimization since the caller is likely to have - * already created them. + * already created them. * @param theBridgeMethod */ private void createBridgeMethod(BcelWorld world, NewMethodTypeMunger munger, ResolvedMember unMangledInterMethod, @@ -1396,7 +1396,9 @@ public class BcelTypeMunger extends ConcreteTypeMunger { // this? ResolvedMember host = AjcMemberMaker.itdAtDeclareParentsField(weaver.getLazyClassGen().getType(), munger.getSignature() .getType(), aspectType); - weaver.getLazyClassGen().addField(makeFieldGen(weaver.getLazyClassGen(), host), null); + FieldGen field = makeFieldGen(weaver.getLazyClassGen(), host); + field.setModifiers(field.getModifiers() | BcelField.AccSynthetic); + weaver.getLazyClassGen().addField(field, null); return true; } -- 2.39.5