Package org.nutz.aop.interceptor

Examples of org.nutz.aop.interceptor.LoggingMethodInterceptor


  @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);
    aop1.argsVoid(null);
View Full Code Here


    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

    assertEquals("[2, 2, 0, 0]", Json.toJson(cpro));
  }

  public ClassAgent getNewClassAgent() {
    ClassAgent classAgent = new AsmClassAgent();
    classAgent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
    return classAgent;
  }
View Full Code Here

        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);
        aop1.argsVoid(null);
View Full Code Here

        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

        assertEquals("[2, 2, 0, 0]", Json.toJson(cpro));
    }

    public ClassAgent getNewClassAgent() {
        ClassAgent classAgent = new AsmClassAgent();
        classAgent.addInterceptor(MethodMatcherFactory.matcher(".*"), new LoggingMethodInterceptor());
        return classAgent;
    }
View Full Code Here

TOP

Related Classes of org.nutz.aop.interceptor.LoggingMethodInterceptor

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.