Examples of JdkRegexpMethodPointcut


Examples of org.springframework.aop.support.JdkRegexpMethodPointcut

    public static void main(String[] args) {
        RegexpBean target = new RegexpBean();
       
        // create the advisor
        JdkRegexpMethodPointcut pc = new JdkRegexpMethodPointcut();
        pc.setPattern(".*foo.*");
        Advisor advisor = new DefaultPointcutAdvisor(pc, new SimpleAdvice());
       
        // create the proxy
        ProxyFactory pf = new ProxyFactory();
        pf.setTarget(target);
View Full Code Here

Examples of org.springframework.aop.support.JdkRegexpMethodPointcut

        return proxyBean((Object) bean, pattern);
    }

    Object proxyBean(Object bean, String methodPattern) {
        DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(interceptor);
        JdkRegexpMethodPointcut pointcut = new JdkRegexpMethodPointcut();
        pointcut.setPattern(methodPattern);
        advisor.setPointcut(pointcut);

        ProxyFactory factoryBean = new ProxyFactory();
        factoryBean.setProxyTargetClass(true);
        factoryBean.addAdvisor(advisor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.