-
1. Re: Adding Methodes
chiba Jan 12, 2005 12:43 PM (in response to sirrurg)Yes, but you must first add dosth$impl() as an abstract
method so that the compiler can resolve that method name.
You can later give a method body to dosth$imple(). -
2. Re: Adding Methodes
sirrurg Jan 12, 2005 1:26 PM (in response to sirrurg)ok ... thx!
So if i understand this correctly, to add the "cross"-call to B.dosthmore(), this class must also already contain a method called dosthmore$impl(),
before i can add the new method-body to A.dosth$impl().
As consequence i must first add all new methods as "abstract"
to all classes which should be changed and then in an 2nd step add
the implementation of this methodes, like in the following code?... foreach(CtClass cls in classes){ cls.stopPruning(true); addAbstractMethodes(cls); cls.writeFile(); } foreach(CtClass cls in classes){ addImplOfMethodes(cls); // here probably cls.stopPruning(false); cls.writeFile(); } // everythings done hopefully
-
3. Re: Adding Methodes
chiba Jan 12, 2005 9:44 PM (in response to sirrurg)Exactly. I could not come up with a better idea than this.
If you have one, please let me know. Thanks. :-) -
4. Re: Adding Methodes
sirrurg Jan 13, 2005 3:08 AM (in response to sirrurg)OK... thx very much, i ll try this out.
-
5. Re: Adding Methodes
sirrurg Jan 16, 2005 10:33 AM (in response to sirrurg)Hi,
i ll tried this 2 step method out and it works.
And by loading all classes at the beginning of the processing,
i dont have to use stopPruning. -
6. Re: Adding Methodes
chiba Jan 17, 2005 10:21 PM (in response to sirrurg)Ah, pruning is now off by default.
-
7. Re: Adding Methodes
sirrurg Jan 18, 2005 3:28 AM (in response to sirrurg)OK ... thx, good to know ;)