Package org.nutz.aop.matcher

Examples of org.nutz.aop.matcher.RegexMethodMatcher


  @Test
  public void testRegexMethodMatcherStringStringInt() throws Throwable {
    AsmClassAgent agent = new AsmClassAgent();
    MyL interceptor = new MyL();
    agent.addInterceptor(new RegexMethodMatcher(null, "nonArgsVoid", 0), interceptor);
    agent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
    Mirror<Aop1> mirror = Mirror.me(agent.define(Nutzs.cd(), Aop1.class));
    Aop1 aop1 = mirror.born("Nutz");
    aop1.nonArgsVoid();
    assertFalse(interceptor.runned);
View Full Code Here


  ClassAgent classAgent;

  @Before
  public void setUp() {
    classAgent = new AsmClassAgent();
    classAgent.addInterceptor(new RegexMethodMatcher(".*"), new AbstractMethodInterceptor() {});
    classAgent.addInterceptor(new RegexMethodMatcher(".*"), new MyMethodInterceptor());
    classAgent.addInterceptor(new RegexMethodMatcher(".*"), new MyMethodInterceptor());
    classAgent.addInterceptor(new RegexMethodMatcher(".*"), new AbstractMethodInterceptor() {});
    classAgent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
  }
View Full Code Here

    ClassAgent classAgent;

    @Before
    public void setUp() {
        classAgent = new AsmClassAgent();
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new AbstractMethodInterceptor() {});
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new MyMethodInterceptor());
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new MyMethodInterceptor());
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new AbstractMethodInterceptor() {});
        classAgent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
    }
View Full Code Here

    @Test
    public void testRegexMethodMatcherStringStringInt() throws Throwable {
        AsmClassAgent agent = new AsmClassAgent();
        MyL interceptor = new MyL();
        agent.addInterceptor(new RegexMethodMatcher(null, "nonArgsVoid", 0), interceptor);
        agent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
        Mirror<Aop1> mirror = Mirror.me(agent.define(Nutzs.cd(), Aop1.class));
        Aop1 aop1 = mirror.born("Nutz");
        aop1.nonArgsVoid();
        assertFalse(interceptor.runned);
View Full Code Here

    ClassAgent classAgent;

    @Before
    public void setUp() {
        classAgent = new AsmClassAgent();
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new AbstractMethodInterceptor() {});
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new MyMethodInterceptor());
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new MyMethodInterceptor());
        classAgent.addInterceptor(new RegexMethodMatcher(".*"), new AbstractMethodInterceptor() {});
        classAgent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
    }
View Full Code Here

TOP

Related Classes of org.nutz.aop.matcher.RegexMethodMatcher

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.