Package org.nutz.ioc.loader.annotation

Examples of org.nutz.ioc.loader.annotation.AnnotationIocLoader


import org.nutz.mvc.NutConfig;

public class AnnotationIocProvider implements IocProvider {

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


import org.nutz.mvc.NutConfig;

public class AnnotationIocProvider implements IocProvider {

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

public class SimpleIocTest {

    @Test(expected=IocException.class)
    public void test_error_bean() {
        Ioc ioc = new NutIoc(new AnnotationIocLoader(DogMaster.class.getPackage().getName()));
        try {
            ioc.get(DogMaster.class);
            fail("Never Success");
        }
        catch (IocException e) {}
View Full Code Here

   
    @Test
    public void test_no_singleton_depose() {
      Issue399Service.CreateCount = 0;
      Issue399Service.DeposeCount = 0;
      Ioc ioc = new NutIoc(new AnnotationIocLoader(Issue399Service.class.getPackage().getName()));
      for (int i = 0; i < 100; i++) {
      ioc.get(Issue399Service.class);
    }
      ioc.depose();
      System.gc();
View Full Code Here

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

TOP

Related Classes of org.nutz.ioc.loader.annotation.AnnotationIocLoader

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.