List of usage examples for org.springframework.aop.framework AopProxy getProxy
Object getProxy();
From source file:org.piraso.proxy.RegexProxyFactory.java
@SuppressWarnings("unchecked") public ProxyInterceptorAware<T> getProxyInterceptor(T object) { RegexMethodInterceptor<T> wrapper = new RegexMethodInterceptorWrapper(new RegexMethodInterceptor<T>(), object);/*from w w w . java2s .c o m*/ wrapper.addAllMethodListener(listeners); T proxy; if (clazz.isInterface()) { proxy = ProxyFactory.getProxy(clazz, wrapper); } else { AdvisedSupport advisedSupport = new AdvisedSupport(); advisedSupport.setTarget(object); advisedSupport.addAdvice(wrapper); AopProxy aopProxy = new DefaultAopProxyFactory().createAopProxy(advisedSupport); proxy = (T) aopProxy.getProxy(); } return new ProxyInterceptorAware<T>(proxy, wrapper); }