AspectJ, "dynamic" pointcuts, and Spring. A great combination (from Dion's weblog)
JoinPointMatcherというのを使えば、Pointcutを文字列で指定できるのだそうです。
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd" <beans> <!-- what follows is an example syntax for specifying a factoryMethod, I hope we end up with something very close to this in Spring --> <bean id="dynamicPointcutConstructionExample" > class="DynamicPointcutConstructionExample" factoryMethod="aspectOf"> <property name="pointcutExpression"> execution(* *(..)) && this(Foo) </property> </bean> </beans>