Examples of FactoryModuleBuilder


Examples of com.google.inject.assistedinject.FactoryModuleBuilder

public class BugTestingEnvironment extends TestingEnvironment {

  @Override
  protected void configure() {
   
    install(new FactoryModuleBuilder().build(Cell.Factory.class));
    install(new FactoryModuleBuilder().build(CellBlock.Factory.class));
    install(new FactoryModuleBuilder().build(CellCache.Factory.class));
    install(new FactoryModuleBuilder().build(CellCacheAggeration.BuilderFactory.class));
   
    super.configure();
  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

  @Override
  protected void configure() {
    install(new GuiceBerryModule());
   
    install(ThrowingProviderBinder.forModule(this));
    install(new FactoryModuleBuilder().build(JQueryFactory.class));
  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

    this.gameMap = gameMap;
  }

  private <T extends Entity> void installEntityFactory(String name, Class<T> type)
  {
    install(new FactoryModuleBuilder()
        .implement(Entity.class, type)
        .build(Key.get(EntityFactory.class, Names.named(name)))
    );
  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

  @Override
  protected void configure()
  {
    bind(World.class).in(Singleton.class);

    install(new FactoryModuleBuilder()
        .implement(Key.get(Controller.class,Names.named("human")), HumanController.class)
        .implement(Key.get(Controller.class,Names.named("orc")), OrcController.class)
        .build(ControllerFactory.class)
    );


    installEntityFactory(EntityType.Orc, Orc.class);
    installEntityFactory(EntityType.OrcSpawner, OrcSpawner.class);
    installEntityFactory(EntityType.Treasure, Treasure.class);
    installEntityFactory(EntityType.Turret, Turret.class);
    installEntityFactory(EntityType.Wall, Wall.class);

    bind(GameMap.class).toInstance(gameMap);

    bind(Size.class).annotatedWith(Names.named("gameWindow")).toInstance(new Size(500,500));
    bind(Size.class).annotatedWith(Names.named("gameScreen")).toInstance(new Size(500,400));
    bind(Size.class).annotatedWith(Names.named("informationScreen")).toInstance(new Size(500,100));


    bind(InteractionManager.class).in(Singleton.class);


    install(new FactoryModuleBuilder().build(PathFinderFactory.class));



  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

    bind(AmbariManagementController.class)
        .to(AmbariManagementControllerImpl.class);
  }

  private void installFactories() {
    install(new FactoryModuleBuilder().implement(
        Cluster.class, ClusterImpl.class).build(ClusterFactory.class));
    install(new FactoryModuleBuilder().implement(
        Host.class, HostImpl.class).build(HostFactory.class));
    install(new FactoryModuleBuilder().implement(
        Service.class, ServiceImpl.class).build(ServiceFactory.class));
    install(new FactoryModuleBuilder().implement(
        ServiceComponent.class, ServiceComponentImpl.class).build(
        ServiceComponentFactory.class));
    install(new FactoryModuleBuilder().implement(
        ServiceComponentHost.class, ServiceComponentHostImpl.class).build(
        ServiceComponentHostFactory.class));
    install(new FactoryModuleBuilder().implement(
        Config.class, ConfigImpl.class).build(ConfigFactory.class));
    install(new FactoryModuleBuilder().build(StageFactory.class));
    install(new FactoryModuleBuilder().build(HostRoleCommandFactory.class));
  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

    @Override
    protected void configure() {     
        bind(ASTNodeTypeConverter.class).to(JavaASTNodeTypeConverter.class);
        bind(SourceCodeChangeClassifier.class).to(JavaSourceCodeChangeClassifier.class);
        install(new FactoryModuleBuilder().build(DistillerFactory.class));
        install(new FactoryModuleBuilder().implement(ASTHelper.class, JavaASTHelper.class)
                .build(ASTHelperFactory.class));
    }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

    bind(ExtractorManager.class).to(CandidateElementManager.class);

    bind(StateFlowGraph.class).to(InMemoryStateFlowGraph.class);
    bind(InMemoryStateFlowGraph.class).in(Singleton.class);

    install(new FactoryModuleBuilder().build(FormHandlerFactory.class));
    install(new FactoryModuleBuilder().build(CandidateElementExtractorFactory.class));

  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

    return jpaPersistModule;
  }

  private void installFactories() {
    install(new FactoryModuleBuilder().implement(
        Cluster.class, ClusterImpl.class).build(ClusterFactory.class));
    install(new FactoryModuleBuilder().implement(
        Host.class, HostImpl.class).build(HostFactory.class));
    install(new FactoryModuleBuilder().implement(
        Service.class, ServiceImpl.class).build(ServiceFactory.class));


    install(new FactoryModuleBuilder()
        .implement(ResourceProvider.class, Names.named("host"), HostResourceProvider.class)
        .implement(ResourceProvider.class, Names.named("hostComponent"), HostComponentResourceProvider.class)
        .implement(ResourceProvider.class, Names.named("service"), ServiceResourceProvider.class)
        .implement(ResourceProvider.class, Names.named("component"), ComponentResourceProvider.class)
        .build(ResourceProviderFactory.class));


    install(new FactoryModuleBuilder().implement(
        ServiceComponent.class, ServiceComponentImpl.class).build(
        ServiceComponentFactory.class));
    install(new FactoryModuleBuilder().implement(
        ServiceComponentHost.class, ServiceComponentHostImpl.class).build(
        ServiceComponentHostFactory.class));
    install(new FactoryModuleBuilder().implement(
        Config.class, ConfigImpl.class).build(ConfigFactory.class));
    install(new FactoryModuleBuilder().implement(
        ConfigGroup.class, ConfigGroupImpl.class).build(ConfigGroupFactory.class));
    install(new FactoryModuleBuilder().implement(RequestExecution.class,
        RequestExecutionImpl.class).build(RequestExecutionFactory.class));
    install(new FactoryModuleBuilder().build(StageFactory.class));
    install(new FactoryModuleBuilder().build(RequestFactory.class));

    bind(HostRoleCommandFactory.class).to(HostRoleCommandFactoryImpl.class);
  }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

      bind(AmbariMetaInfo.class).toInstance(ambariMetaInfo);
    }

    private void installDependencies() {
      install(new AmbariJpaPersistModule("ambari-javadb"));
      install(new FactoryModuleBuilder().implement(
          Cluster.class, ClusterImpl.class).build(ClusterFactory.class));
      install(new FactoryModuleBuilder().implement(
          Host.class, HostImpl.class).build(HostFactory.class));
      install(new FactoryModuleBuilder().implement(
          Service.class, ServiceImpl.class).build(ServiceFactory.class));
      install(new FactoryModuleBuilder().implement(
          ServiceComponent.class, ServiceComponentImpl.class).build(
          ServiceComponentFactory.class));
      install(new FactoryModuleBuilder().implement(
          ServiceComponentHost.class, ServiceComponentHostImpl.class).build(
          ServiceComponentHostFactory.class));
      install(new FactoryModuleBuilder().implement(
          Config.class, ConfigImpl.class).build(ConfigFactory.class));
      install(new FactoryModuleBuilder().implement(
        ConfigGroup.class, ConfigGroupImpl.class).build(ConfigGroupFactory.class));
      install(new FactoryModuleBuilder().implement(RequestExecution.class,
        RequestExecutionImpl.class).build(RequestExecutionFactory.class));
      install(new FactoryModuleBuilder().build(StageFactory.class));
      install(new FactoryModuleBuilder().build(HostRoleCommandFactory.class));
    }
View Full Code Here

Examples of com.google.inject.assistedinject.FactoryModuleBuilder

    bind(TransactionSystemClient.class)
      .annotatedWith(Names.named("transaction.off"))
      .to(DetachedTxSystemClient.class).in(Scopes.SINGLETON);

    // When transaction is off, use a TransactionExecutorFactory that uses DetachedTxSystemClient
    install(new FactoryModuleBuilder()
              .implement(TransactionExecutor.class, DetachedTransactionExecutor.class)
              .build(Key.get(TransactionExecutorFactory.class, Names.named("transaction.off"))));

    // Creates a DataFabricFacadeFactory injection for creating DataFabricFacade of different types.
    install(
      new FactoryModuleBuilder()
        .implement(DataFabricFacade.class, TransactionDataFabricFacade.class)
        .implement(DataFabricFacade.class, Names.named("transaction.off"), DetachedDataFabricFacade.class)
        .build(DataFabricFacadeFactory.class)
    );
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.