]> source.dussan.org Git - aspectj.git/commitdiff
First bits of fix for pr98901 (annotation copying)
authoraclement <aclement>
Mon, 18 Jul 2005 08:44:04 +0000 (08:44 +0000)
committeraclement <aclement>
Mon, 18 Jul 2005 08:44:04 +0000 (08:44 +0000)
weaver/src/org/aspectj/weaver/AjcMemberMaker.java
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java

index 4ef65ba886ab11f14806c90868858468f915212e..798864ff13e9b24b01316b79aac68b8c893033b8 100644 (file)
@@ -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) 
        {
index 7fd5311bbdf4b240180e3e5d9a10314b8c1c153a..f791f567a0a7c7c5de98a56222b6d795f5c08549 100644 (file)
@@ -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()