|
From: Rod J. <rod...@in...> - 2003-10-25 08:37:51
|
I sent this to the list yesterday...don't know why it hasn't shown up. ----- Original Message ----- From: "Rod Johnson" <rod...@in...> To: <spr...@li...> Sent: Friday, October 24, 2003 1:44 PM Subject: 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 > |