Examples of Hippo


Examples of org.nutz.aop.javassist.meta.Hippo

    Arrays.fill(cpro, 0);
    ClassAgent aca = getNewClassAgent();
    aca.addInterceptor(MethodMatcherFactory.matcher(PUBLIC), new MethodCounter(cpub));
    aca.addInterceptor(MethodMatcherFactory.matcher(PROTECTED), new MethodCounter(cpro));
    Class<? extends Hippo> c = aca.define(Nutzs.cd(), Hippo.class);// RA.class;
    Hippo r = Mirror.me(c).born();
    Vegetarians.run(r, 78);
    r.doSomething(BEH.run);
    try {
      r.doSomething(BEH.lecture);
      fail();
    }
    catch (Throwable e) {}
    try {
      r.doSomething(BEH.fly);
      fail();
    }
    catch (Throwable e) {}
    assertEquals("[3, 1, 1, 1]", Json.toJson(cpub));
    assertEquals("[2, 2, 0, 0]", Json.toJson(cpro));
View Full Code Here

Examples of org.nutz.aop.javassist.meta.Hippo

        Arrays.fill(cpro, 0);
        ClassAgent aca = getNewClassAgent();
        aca.addInterceptor(MethodMatcherFactory.matcher(PUBLIC), new MethodCounter(cpub));
        aca.addInterceptor(MethodMatcherFactory.matcher(PROTECTED), new MethodCounter(cpro));
        Class<? extends Hippo> c = aca.define(Nutzs.cd(), Hippo.class);// RA.class;
        Hippo r = Mirror.me(c).born();
        Vegetarians.run(r, 78);
        r.doSomething(BEH.run);
        try {
            r.doSomething(BEH.lecture);
            fail();
        }
        catch (Throwable e) {}
        try {
            r.doSomething(BEH.fly);
            fail();
        }
        catch (Throwable e) {}
        assertEquals("[3, 1, 1, 1]", Json.toJson(cpub));
        assertEquals("[2, 2, 0, 0]", Json.toJson(cpro));
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.