Package juzu.impl.inject.spi

Examples of juzu.impl.inject.spi.InjectionContext$BeanLifeCycleImpl


    bootstrap.declareBean(Properties.class, Scope.SINGLETON, null, null);
    bootstrap.bindBean(HashSet.class, null, singleton);
    Injector injector = bootstrap.get();
    bootstrap.declareBean(Date.class, Scope.SINGLETON, null, null);
    boot();
    InjectionContext context = boot(injector);

    //
    Properties p1 = getBean(Properties.class);
    Properties p2 = getBean(Properties.class);
    assertSame(p1, p2);
    Date s1 = getBean(Date.class);
    Date s2 = getBean(Date.class);
    assertSame(s1, s2);
    assertSame(singleton, getBean(HashSet.class));

    //
    Properties p3 = getBean(context, Properties.class);
    Properties p4 = getBean(context, Properties.class);
    assertSame(p3, p4);
    assertNotSame(p1, p3);
    if (di != InjectorProvider.GUICE) {
      assertNull(context.get(Date.class));
    }
    assertSame(singleton, getBean(context, HashSet.class));
  }
View Full Code Here

TOP

Related Classes of juzu.impl.inject.spi.InjectionContext$BeanLifeCycleImpl

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.