|
From: Rod J. <rod...@in...> - 2003-10-25 11:59:17
|
Guys, I think we should change the signature on the StaticMethodPointcut applies() method to introduce a new argument, targetClass, as below: boolean applies(Method method, Class targetClass, AttributeRegistry attributeRegistry); The reason is that sometimes we need to know not just the method, but the target class we're invoking. Consider the getAge() method on class TestBean. A subclass, SpecialTestBean adds a class-level metadata attribute that should cause auto-proxying. With the old signature, the method argument would be TestBean.getAge() and without knowledge of the target class we would miss this important attribute. Does everyone agree this makes sense? Is there a better solution? This will break existing static pointcuts, although it's trivial to fix. I've already revised the source and test tree (although not committed yet). Hence I didn't commit it before M2. Regards, Rod |
|
From: Colin S. <col...@ex...> - 2003-10-25 13:45:54
|
+1 Rod Johnson wrote: >Guys, > >I think we should change the signature on the StaticMethodPointcut applies() >method to introduce a new argument, targetClass, as below: > >boolean applies(Method method, Class targetClass, AttributeRegistry >attributeRegistry); > >The reason is that sometimes we need to know not just the method, but the >target class we're invoking. > >Consider the getAge() method on class TestBean. A subclass, SpecialTestBean >adds a class-level metadata attribute that should cause auto-proxying. With >the old signature, the method argument would be TestBean.getAge() and >without knowledge of the target class we would miss this important >attribute. > >Does everyone agree this makes sense? Is there a better solution? > >This will break existing static pointcuts, although it's trivial to fix. >I've already revised the source and test tree (although not committed yet). >Hence I didn't commit it before M2. > >Regards, >Rod > > |
|
From: Trevor C. <pr...@se...> - 2003-10-27 01:49:49
|
+1 -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Rod Johnson Sent: October 24, 2003 8:44 AM To: spr...@li... Subject: [Springframework-developer] StaticMethodPointcut Guys, I think we should change the signature on the StaticMethodPointcut applies() method to introduce a new argument, targetClass, as below: boolean applies(Method method, Class targetClass, AttributeRegistry attributeRegistry); The reason is that sometimes we need to know not just the method, but the target class we're invoking. Consider the getAge() method on class TestBean. A subclass, SpecialTestBean adds a class-level metadata attribute that should cause auto-proxying. With the old signature, the method argument would be TestBean.getAge() and without knowledge of the target class we would miss this important attribute. Does everyone agree this makes sense? Is there a better solution? This will break existing static pointcuts, although it's trivial to fix. I've already revised the source and test tree (although not committed yet). Hence I didn't commit it before M2. Regards, Rod ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.530 / Virus Database: 325 - Release Date: 22/10/2003 |
|
From: Rod J. <rod...@in...> - 2003-10-27 07:26:15
|
It's changed. R ----- Original Message ----- From: "Trevor Cook" <pr...@se...> To: <spr...@li...> Sent: Monday, October 27, 2003 1:45 AM Subject: RE: [Springframework-developer] StaticMethodPointcut > +1 > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Rod Johnson > Sent: October 24, 2003 8:44 AM > To: spr...@li... > Subject: [Springframework-developer] StaticMethodPointcut > > > Guys, > > I think we should change the signature on the StaticMethodPointcut applies() > method to introduce a new argument, targetClass, as below: > > boolean applies(Method method, Class targetClass, AttributeRegistry > attributeRegistry); > > The reason is that sometimes we need to know not just the method, but the > target class we're invoking. > > Consider the getAge() method on class TestBean. A subclass, SpecialTestBean > adds a class-level metadata attribute that should cause auto-proxying. With > the old signature, the method argument would be TestBean.getAge() and > without knowledge of the target class we would miss this important > attribute. > > Does everyone agree this makes sense? Is there a better solution? > > This will break existing static pointcuts, although it's trivial to fix. > I've already revised the source and test tree (although not committed yet). > Hence I didn't commit it before M2. > > Regards, > Rod > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.530 / Virus Database: 325 - Release Date: 22/10/2003 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |