Package org.springframework.aop.framework

Examples of org.springframework.aop.framework.AdvisedSupport


  @Before
  public void setUp() {
    converter = new Jaxb2RootElementHttpMessageConverter();
    rootElement = new RootElement();
    DefaultAopProxyFactory proxyFactory = new DefaultAopProxyFactory();
    AdvisedSupport advisedSupport = new AdvisedSupport();
    advisedSupport.setTarget(rootElement);
    advisedSupport.setProxyTargetClass(true);
    AopProxy proxy = proxyFactory.createAopProxy(advisedSupport);
    rootElementCglib = (RootElement) proxy.getProxy();
  }
View Full Code Here


    super(clazz);
  }

  @Override
  public void run(RunNotifier notifier) {
    AdvisedSupport config = new AdvisedSupport();
    config.setTarget(notifier);
    config.addAdvice(new org.aopalliance.intercept.MethodInterceptor() {
      public Object invoke(MethodInvocation invocation) throws Throwable {
        if ("fireTestFailure".equals(invocation.getMethod().getName())) {
          Failure failure = (Failure) invocation.getArguments()[0];
          if (failure.getException() instanceof NotSwallowedException) {
            // We expect this
View Full Code Here

TOP

Related Classes of org.springframework.aop.framework.AdvisedSupport

Copyright © 2018 www.massapicom. 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.