Examples of Ioc


Examples of org.nutz.ioc.Ioc

    @Test
    public void test_simple() {
      DefaultClassDefiner.reset();
        IocLoader il = new JsonLoader("org/nutz/ioc/json/aop.js");
        Ioc ioc = new NutIoc(il);
        StringBuilder sb = ioc.get(StringBuilder.class, "sb");
        Mammal fox = ioc.get(Mammal.class, "fox");

        assertEquals("Fox", fox.getName());
        assertEquals("B:getName0;A:getName0;", sb.toString());
        sb.delete(0, sb.length());
        fox.getName();
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.