From: aclement Date: Mon, 18 Jul 2005 08:44:04 +0000 (+0000) Subject: First bits of fix for pr98901 (annotation copying) X-Git-Tag: V1_5_0M3~304 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=28c116d4771fd24f5298e7353fa68335e0f09a90;p=aspectj.git First bits of fix for pr98901 (annotation copying) --- diff --git a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java index 4ef65ba88..798864ff1 100644 --- a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java +++ b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java @@ -605,8 +605,9 @@ public class AjcMemberMaker { /** - * This method goes on the target type of the inter-type method. (and possibly the topmost-implemeters, - * if the target type is an interface) + * This method goes on the target type of the inter-type method. (and possibly the topmost-implementors, + * if the target type is an interface). The implementation will call the interMethodDispatch method on the + * aspect. */ public static ResolvedMember interMethod(ResolvedMember meth, UnresolvedType aspectType, boolean onInterface) { @@ -623,7 +624,8 @@ public class AjcMemberMaker { } /** - * This static method goes on the declaring aspect of the inter-type method. + * This static method goes on the declaring aspect of the inter-type method. The implementation + * calls the interMethodBody() method on the aspect. */ public static ResolvedMember interMethodDispatcher(ResolvedMember meth, UnresolvedType aspectType) { @@ -639,7 +641,8 @@ public class AjcMemberMaker { } /** - * This static method goes on the declaring aspect of the inter-type method. + * This method goes on the declaring aspect of the inter-type method. + * It contains the real body of the ITD method. */ public static ResolvedMember interMethodBody(ResolvedMember meth, UnresolvedType aspectType) { diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 7fd5311bb..f791f567a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -972,6 +972,11 @@ public final class LazyClassGen { myGen.addField(field); } + public void replaceField(Field oldF, Field newF){ + myGen.removeField(oldF); + myGen.addField(newF); + } + public void addField(Field field, ISourceLocation sourceLocation) { addField(field); if (!(field.isPrivate()