Package org.richfaces.application

Examples of org.richfaces.application.DependencyInjectorImpl$Injector


       
        JsonConfig config = new JsonConfig(new File("./src/test/resources/tck.json"));
       
        instancer = new DefaultClassInjector(config.getConfig(Thread.currentThread().getContextClassLoader()));
       
        Injector injector = new Injector(Thread.currentThread().getContextClassLoader(), scanner, analyser, instancer);
        Car car = injector.getInstance(Car.class);
        return Tck.testsFor(car, true, true);
    }
View Full Code Here


        binder.instance(Seat.class).as(DriversSeat.class).when(qualifierIs(Seat.class, Drivers.class));
        binder.instance(Tire.class).as(SpareTire.class).when(isNamed(Tire.class, "spare"));
       
        instancer = new DefaultClassInjector(binder.build());
       
        Injector injector = new Injector(Thread.currentThread().getContextClassLoader(), scanner, analyser, instancer);
        Car car = injector.getInstance(Car.class);
        return Tck.testsFor(car, true, true);
    }
View Full Code Here

       
        XmlConfig config = new XmlConfig(new File("./src/test/resources/tck.xml"));
       
        instancer = new DefaultClassInjector(config.getConfig(Thread.currentThread().getContextClassLoader()));
       
        Injector injector = new Injector(Thread.currentThread().getContextClassLoader(), scanner, analyser, instancer);
        Car car = injector.getInstance(Car.class);
        return Tck.testsFor(car, true, true);
    }
View Full Code Here

        injector.init(Collections.<Module>singletonList(new Module() {
            public void configure(ServicesFactory injector) {
                injector.setInstance(ResourceCodec.class, mockedCodec);
                injector.setInstance(org.richfaces.cache.Cache.class, mockCache);
                injector.setInstance(Uptime.class, new Uptime());
                injector.setInstance(DependencyInjector.class, new DependencyInjectorImpl());
                injector.setInstance(ConfigurationService.class, new ConfigurationServiceImpl());
            }
        }));
        ServiceTracker.setFactory(injector);
View Full Code Here

        Module module = new Module() {
            public void configure(ServicesFactory factory) {
                factory.setInstance(ConfigurationService.class, new ConfigurationServiceImpl());
                factory.setInstance(SkinFactory.class, new SkinFactoryImpl());
                factory.setInstance(FileNameMapper.class, fileNameMapper);
                factory.setInstance(DependencyInjector.class, new DependencyInjectorImpl());
                factory.setInstance(ResourceHandler.class, resourceHandler);
                factory.setInstance(ResourceTracker.class, new ResourceTrackerImpl());
                factory.setInstance(MappedResourceFactory.class, new NullMappedResourceFactory());
            }
        };
View Full Code Here

TOP

Related Classes of org.richfaces.application.DependencyInjectorImpl$Injector

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.