Examples of ScopeContext


Examples of org.nutz.ioc.impl.ScopeContext

    @Test
    public void test_constants_context() {
        String s = "@Context.save('xx', 'tt', null)";
        ChainNode cn = N(s);
        assertEquals(s, cn.toString());
        IocMaking ing = new IocMaking(null, null, new ScopeContext("app"), null, null, null);
        assertFalse((Boolean) cn.eval(ing));
    }
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

        String s = "@Context.save('xx', 'tt', null)";
        ChainNode cn = N(s);
        assertEquals(s, cn.toString());
        IocMaking ing = new IocMaking(null,
                                      null,
                                      new ScopeContext("app"),
                                      null,
                                      null,
                                      null);
        assertFalse((Boolean) cn.eval(ing));
    }
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

        assertEquals("F2", f2.getName());
        Animal f22 = ioc.get(Animal.class, "f2");
        assertEquals("F2", f22.getName());
        assertFalse(f2 == f22);

        ScopeContext ic = new ScopeContext("MyScope");
        Map<String, ObjectProxy> map = ic.getObjs();
        f2 = ioc.get(Animal.class, "f2", ic);
        assertEquals("F2", f2.getName());
        f22 = ioc.get(Animal.class, "f2", ic);
        assertEquals("F2", f22.getName());
        assertTrue(f2 == f22);
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

        IocContext ic;
    }

    @Test
    public void test_refer_context() {
        IocContext context = new ScopeContext("abc");
        String json = "{obj:{singleton:false,fields:{ic:{refer:'$conText'}}}}";
        Ioc2 ioc = new NutIoc(new MapLoader(json), context, "abc");
        TestReferContext trc = ioc.get(TestReferContext.class);
        assertTrue(context == trc.ic);

        IocContext context2 = new ScopeContext("rrr");
        trc = ioc.get(TestReferContext.class, "obj", context2);
        assertTrue(trc.ic instanceof ComboContext);
    }
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

public class ComboIocProvider implements IocProvider {

    public Ioc create(NutConfig config, String[] args) {
        try {
            return new NutIoc(new ComboIocLoader(args), new ScopeContext("app"), "app");
        }
        catch (ClassNotFoundException e) {
            throw Lang.wrapThrow(e);
        }
    }
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

import org.nutz.mvc.NutConfig;

public class XmlIocProvider implements IocProvider {

    public Ioc create(NutConfig config, String[] args) {
        return new NutIoc(new XmlIocLoader(args), new ScopeContext("app"), "app");
    }
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

public class AnnotationIocProvider implements IocProvider {

    public Ioc create(NutConfig config, String[] args) {
      if (args == null || args.length == 0)
        args = new String[]{config.getMainModule().getPackage().getName()};
        return new NutIoc(new AnnotationIocLoader(args), new ScopeContext("app"), "app");
    }
View Full Code Here

Examples of org.nutz.ioc.impl.ScopeContext

import org.nutz.mvc.NutConfig;

public class JsonIocProvider implements IocProvider {

    public Ioc create(NutConfig config, String[] args) {
        return new NutIoc(new JsonLoader(args), new ScopeContext("app"), "app");
    }
View Full Code Here

Examples of railo.runtime.type.scope.ScopeContext

  }*/
 
 
  public static int getSessionCount(){
    PageContext pc = ThreadLocalPageContext.get();
    ScopeContext sc = ((CFMLFactoryImpl)pc.getCFMLFactory()).getScopeContext();
    return sc.getSessionCount(pc);
  }
View Full Code Here

Examples of railo.runtime.type.scope.ScopeContext

    return sc.getSessionCount(pc);
  }
 
  public static Struct getSessionCollection(String appName){
    PageContext pc = ThreadLocalPageContext.get();
    ScopeContext sc = ((CFMLFactoryImpl)pc.getCFMLFactory()).getScopeContext();
    return sc.getAllSessionScopes(appName);
  }
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.