Package org.springframework.aop.aspectj

Examples of org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer


      }
    }.runTest();
  }

  public void testParameterNameDiscoverWithReferencePointcut() throws Exception {
    AspectJAdviceParameterNameDiscoverer discoverer =
        new AspectJAdviceParameterNameDiscoverer("somepc(formal) && set(* *)");
    discoverer.setRaiseExceptions(true);
    Method methodUsedForParameterTypeDiscovery =
        getClass().getMethod("methodWithOneParam", String.class);
    String[] pnames = discoverer.getParameterNames(methodUsedForParameterTypeDiscovery);
    assertEquals("one parameter name", 1, pnames.length);
    assertEquals("formal", pnames[0]);
  }
View Full Code Here


    proxiedTestBean.doInTransaction(); // should throw
  }

  @Test
  public void testParameterNameDiscoverWithReferencePointcut() throws Exception {
    AspectJAdviceParameterNameDiscoverer discoverer =
        new AspectJAdviceParameterNameDiscoverer("somepc(formal) && set(* *)");
    discoverer.setRaiseExceptions(true);
    Method methodUsedForParameterTypeDiscovery =
        getClass().getMethod("methodWithOneParam", String.class);
    String[] pnames = discoverer.getParameterNames(methodUsedForParameterTypeDiscovery);
    assertEquals("one parameter name", 1, pnames.length);
    assertEquals("formal", pnames[0]);
  }
View Full Code Here

TOP

Related Classes of org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer

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.