|
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 > > |