What is the difference between JdkRegexpMethodPointcut..

and RegexpMethodPointcutAdvisor?

Here is the sample usage for JdkRegexpMethodPointcut..
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd">
 
    <!-- Target object -->
    <bean id="bar" class="biz.tugay.springaopexamples.bar.BarImpl"/>
 
    <!-- Advice -->
    <bean id="myDummyAdvice" class="biz.tugay.springaopexamples.MyDummyAdviceImpl"/>
 
    <!-- Pointcut -->
    <bean id="myRegExpPCut" class="org.springframework.aop.support.JdkRegexpMethodPointcut">
        <property name="pattern" value=".*foo.FooImpl.*"/>
    </bean>
 
    <!-- Advisor -->
    <bean id="myAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
        <property name="pointcut" ref="myRegExpPCut"/>
        <property name="advice" ref="myDummyAdvice"/>
    </bean>
 
    <!-- Proxy config -->
    <bean id="barProxy" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="bar"/>
        <property name="interceptorNames">
            <list>
                <value>myAdvisor</value>
            </list>
        </property>
    </bean>
</beans>

And here is a sample usage for RegexpMethodPointcutAdvisor..
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd">
 
    <!-- Target object -->
    <bean id="bar" class="biz.tugay.springaopexamples.bar.BarImpl"/>
 
    <!-- Advice -->
    <bean id="myDummyAdvice" class="biz.tugay.springaopexamples.MyDummyAdviceImpl"/>
 
    <!-- Advisor -->
    <bean id="myAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
        <property name="pattern" value=".*foo.FooImpl.*"/>
        <property name="advice" ref="myDummyAdvice"/>
    </bean>
 
    <!-- Proxy config -->
    <bean id="barProxy" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="bar"/>
        <property name="interceptorNames">
            <list>
                <value>myAdvisor</value>
            </list>
        </property>
    </bean>
</beans>


So what are the differences?

RegexpMethodPointcutAdvisor references the pattern directly, instead of a Pointcut