Package org.springframework.aop.framework

Examples of org.springframework.aop.framework.ProxyFactory.addInterface()


    for (Class<?> type : propertyType.getInterfaces()) {
      proxyFactory.addInterface(type);
    }

    proxyFactory.addInterface(LazyLoadingProxy.class);
    proxyFactory.addInterface(propertyType);
    proxyFactory.addAdvice(interceptor);

    return handler.populateId(property, dbref, proxyFactory.getProxy());
  }
View Full Code Here


    };
    ProxyFactory factory = new ProxyFactory();
    factory.addAdvisor(new DefaultPointcutAdvisor(Pointcut.TRUE, interceptor));
    factory.setProxyTargetClass(false);
    factory.addInterface(Foo.class);
    factory.setTarget(delegate);
    delegate = (Foo) factory.getProxy();
    return delegate;
  }
View Full Code Here

    @SuppressWarnings("unchecked")
    private I createAdapterProxy(Object annotatedHandler, final T adapter, final Class<I> adapterInterface,
                                 boolean proxyTargetClass, ClassLoader classLoader) {
        ProxyFactory pf = new ProxyFactory(annotatedHandler);
        pf.addAdvice(new AdapterIntroductionInterceptor(adapter, adapterInterface));
        pf.addInterface(adapterInterface);
        pf.addInterface(Subscribable.class);
        pf.setProxyTargetClass(proxyTargetClass);
        pf.setExposeProxy(true);
        return (I) pf.getProxy(classLoader);
    }
View Full Code Here

    private I createAdapterProxy(Object annotatedHandler, final T adapter, final Class<I> adapterInterface,
                                 boolean proxyTargetClass, ClassLoader classLoader) {
        ProxyFactory pf = new ProxyFactory(annotatedHandler);
        pf.addAdvice(new AdapterIntroductionInterceptor(adapter, adapterInterface));
        pf.addInterface(adapterInterface);
        pf.addInterface(Subscribable.class);
        pf.setProxyTargetClass(proxyTargetClass);
        pf.setExposeProxy(true);
        return (I) pf.getProxy(classLoader);
    }
View Full Code Here

    bundleContext = null;
  }

  private Object createProxy(Object target, Class intf, Advice[] advices) {
    ProxyFactory factory = new ProxyFactory();
    factory.addInterface(intf);
    if (advices != null)
      for (int i = 0; i < advices.length; i++) {
        factory.addAdvice(advices[0]);
      }
View Full Code Here

    };
    ProxyFactory factory = new ProxyFactory();
    factory.addAdvisor(new DefaultPointcutAdvisor(Pointcut.TRUE, interceptor));
    factory.setProxyTargetClass(false);
    factory.addInterface(Foo.class);
    factory.setTarget(delegate);
    delegate = (Foo) factory.getProxy();
    return delegate;
  }
View Full Code Here

    ProxyFactory factory = new ProxyFactory();
    for (Advice advice : getAdviceChain()) {
      factory.addAdvisor(new DefaultPointcutAdvisor(Pointcut.TRUE, advice));
    }
    factory.setProxyTargetClass(false);
    factory.addInterface(ContainerDelegate.class);
    factory.setTarget(delegate);
    proxy = (ContainerDelegate) factory.getProxy();
  }

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