Examples of injectMembers()


Examples of com.google.inject.Injector.injectMembers()

   private TemplateOptions templateOptions;

   @BeforeMethod
   public void setUp() {
      Injector injector = createInjector();
      injector.injectMembers(this);
      this.nodeMeta1 = new NodeMetadataBuilder().id("testmeta1").status(Status.ERROR).build();
      this.nodeMeta2 = new NodeMetadataBuilder().id("testmeta2").status(Status.ERROR).build();
      this.templateOptions = new TemplateOptions().overrideLoginUser("testuser").overrideLoginPassword("testpass")
               .overrideAuthenticateSudo(true).userMetadata("testmetakey", "testmetavalue")
               .overrideLoginPrivateKey("pk").userMetadata("testmetakey2", "testmetavalue2")
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

           
            final IsisConfigurationBuilder isisConfigurationBuilder = createConfigBuilder();
   
            final IsisInjectModule isisModule = newIsisModule(deploymentType, isisConfigurationBuilder);
            final Injector injector = Guice.createInjector(isisModule, newIsisWicketModule());
            injector.injectMembers(this);
           
            final IsisConfiguration configuration = isisConfigurationBuilder.getConfiguration();
            this.getMarkupSettings().setStripWicketTags(determineStripWicketTags(deploymentType, configuration));
   
            initWicketComponentInjection(injector);
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

        final IsisConfigurationBuilder isisConfigurationBuilder = createConfigBuilder(getServletContext());

        final IsisInjectModule isisModule = new IsisInjectModule(deploymentType, isisConfigurationBuilder);
        final Injector injector = Guice.createInjector(isisModule, newIsisWicketModule());
        injector.injectMembers(this);

        this.bookmarkedPagesModel = new BookmarkedPagesModel();

        initWicketComponentInjection(injector);
    }
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

            List<WebAppPlugin> webAppPlugins = toList(ServiceLoaderUtil.load(WebAppPlugin.class));
            for (WebAppPlugin webAppPlugin : webAppPlugins) {
                LOGGER.info("Loading webapp plugin: %s", webAppPlugin.getClass().getName());
                try {
                    injector.injectMembers(webAppPlugin);
                    webAppPlugin.init(app, servletContext, authenticatorInstance);
                } catch (Exception e) {
                    throw new LumifyException("Could not initialize webapp plugin: " + webAppPlugin.getClass().getName(), e);
                }
            }
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

    }

    private void ensureInitialized(AtmosphereResource resource) {
        if (userRepository == null) {
            Injector injector = (Injector) resource.getAtmosphereConfig().getServletContext().getAttribute(Injector.class.getName());
            injector.injectMembers(this);
        }

        if (!subscribedToBroadcast) {
            this.workQueueRepository.subscribeToBroadcastMessages(new WorkQueueRepository.BroadcastConsumer() {
                @Override
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

    Injector injector = TargetPlatformActivator
        .getInstance()
        .getInjector(
            TargetPlatformActivator.FR_OBEO_RELENG_TARGETPLATFORM_TARGETPLATFORM);
    Converter converter = new Converter();
    injector.injectMembers(converter);
    Diagnostic diagnostic = null;
    final String path = selectedElement.getLocation().toFile().getAbsolutePath();
    URI targetplatformFileURI = URI.createFileURI(path);

    try {
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

    }
   
    TargetPlatformStandaloneSetup.doSetup();
    Injector injector = TargetPlatformBundleActivator.getInstance().getInjector(TargetPlatformBundleActivator.TARGET_PLATFORM_LANGUAGE_NAME);
    Converter converter = new Converter();
    injector.injectMembers(converter);

    URI uri = normalize(org.eclipse.emf.common.util.URI.createURI(path));
   
    Diagnostic diagnostic = converter.generateTargetDefinitionFile(uri, createPrintingMonitor());
   
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

    Set<ServiceRequest> setRequests = new HashSet<ServiceRequest>();
    setRequests.add(request1);

    // expectations
    // constructor init
    injector.injectMembers(capture(controllerCapture));
    expect(injector.getInstance(Gson.class)).andReturn(null);
    expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(maintHelper);

    // getServices
    expect(clusters.getCluster("cluster1")).andReturn(cluster);
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

    Set<ServiceRequest> setRequests = new HashSet<ServiceRequest>();
    setRequests.add(request1);

    // expectations
    // constructor init
    injector.injectMembers(capture(controllerCapture));
    expect(injector.getInstance(Gson.class)).andReturn(null);
    expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(maintHelper);

    // getServices
    expect(clusters.getCluster("cluster1")).andReturn(cluster);
View Full Code Here

Examples of com.google.inject.Injector.injectMembers()

    setRequests.add(request3);
    setRequests.add(request4);

    // expectations
    // constructor init
    injector.injectMembers(capture(controllerCapture));
    expect(injector.getInstance(Gson.class)).andReturn(null);
    expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(maintHelper);

    // getServices
    expect(clusters.getCluster("cluster1")).andReturn(cluster).times(4);
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.