• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ThrowingProviderBinder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.inject.throwingproviders.ThrowingProviderBinder的典型用法代码示例。如果您正苦于以下问题:Java ThrowingProviderBinder类的具体用法?Java ThrowingProviderBinder怎么用?Java ThrowingProviderBinder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ThrowingProviderBinder类属于com.google.inject.throwingproviders包,在下文中一共展示了ThrowingProviderBinder类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
protected void configure() {
    bind(BaseRecorderFunctionFactory.class).to(PredefinedRecorderFunctionFactory.class);
    bind(FunctionRegistry.class).to(RecorderFunctionRegistry.class);
    bind(javascriptGeneratorByNameAndWebDriverActionConfiguration)
            .to(new TypeLiteral<IncludeInvokeGenerator<NameWebDriverActionConfiguration>>() {});
    bind(new TypeLiteral<JavascriptGenerator<ApplicationActionConfiguration>>(){})
            .to(RecordingWebDriverActionsOnly.class);
    bind(new TypeLiteral<FunctionRegistry<NameWebDriverActionConfiguration>>(){})
            .to(RecorderFunctionRegistry.class);
    bind(new TypeLiteral<Predicate<HttpRequest>>() {})
            .annotatedWith(Names.named(SHOULD_INJECT_JS_PREDICATE))
            .to(GetHtmlFromCurrentHostPredicate.class);

    bind(HttpRequestToTestCaseStepConverter.class)
            .annotatedWith(Names.named(CONVENTION_EVENT_DETECTOR_CONVERTOR))
            .to(SplitQueryStringOfRequest.class);

    bind(syntaxASTconverter).to(SyntaxDefinitionASTNodeConverter.class);
    bind(actionASTconverter).to(ActionASTNodeConverter.class);
    bind(conditionASTconverter).to(ConditionASTNodeConverter.class);
    bind(applicationActionASTconverter).to(ApplicationActionASTNodeConverter.class);
    bind(modelASTconverter).to(TraversingBasedASTNodeConverter.class);

    bind(ApplicationConfigurationParser.class).to(DslParser.class);

    // TODO: other OSes should have a different binding
    bind(VirtualScreenProcessCreator.class).to(UbuntuVirtualScreenProcessCreator.class);
    bindConstant().annotatedWith(Names.named(RECORD_TEMPLATE_RESOURCE)).to("/record.js");
    bindConstant().annotatedWith(Names.named(REPLAY_TEMPLATE_RESOURCE)).to("/replay.js");

    // state
    bind(RecordingState.class).in(Singleton.class);
    bind(ReplayingState.class).in(Singleton.class);

    install(ThrowingProviderBinder.forModule(this));
}
 
开发者ID:hristo-vrigazov,项目名称:bromium,代码行数:38,代码来源:DefaultModule.java


示例2: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
protected void configure() {
    requireBinding(SqlConfiguration.class);

    ThrowingProviderBinder
        .create(binder())
        .bind(DataSourceProvider.class, DataSource.class)
        .to(ConfiguredDataSourceProvider.class)
        .in(Singleton.class);
}
 
开发者ID:Twister915,项目名称:pl,代码行数:11,代码来源:SqlModule.java


示例3: configureCommonBeans

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
protected void configureCommonBeans() {
    ThrowingProviderBinder.forModule(this);
    bindConstant().annotatedWith(Names.named("testOnly")).to(options.testOnly());
    bindConstant().annotatedWith(Names.named("skipFirst")).to(options.skipFirst());
    try {
        bindInputFormat();
    } catch (Exception e) {
        Throwables.propagate(e);
    }
    bind(FeaturesProcessor.class);
    bind(FtrlProximalRunner.class).asEagerSingleton();
    bind(FinishCollectStatisticsListener.class).asEagerSingleton();
    bind(Phaser.class).asEagerSingleton();
    bind(FtrlOptions.class).toInstance(options);
}
 
开发者ID:scaled-ml,项目名称:Scaled-ML,代码行数:16,代码来源:AbstractParallelModule.java


示例4: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
protected void configure() {
  ThrowingProviderBinder.create(binder())
      .bind(MailProvider.class, LocalStorage.class)
      .to(ThunderbirdMailbox.class);

  bind(XMozillaStatusParser.class);
}
 
开发者ID:google,项目名称:mail-importer,代码行数:9,代码来源:ThunderbirdModule.java


示例5: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
protected void configure() {
    ThrowingProviderBinder.create(binder())
            .bind(PaginationProvider.class, Pagination.class)
            .to(PaginationProviderImpl.class)
            .in(RequestScoped.class);
}
 
开发者ID:enviroCar,项目名称:enviroCar-server,代码行数:8,代码来源:PaginationModule.java


示例6: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
public void configure(final Binder binder)
{
    bindConfig(binder).to(HiveMetastoreClientConfig.class);
    thriftClientBinder(binder).bindThriftClient(HiveMetastore.class);

    binder.bind(HiveMetastoreFactory.class).to(GuiceHiveMetastoreFactory.class).in(Scopes.SINGLETON);
    ThrowingProviderBinder.create(binder).bind(HiveMetastoreProvider.class, HiveMetastore.class).to(HiveMetastoreFactory.class);
}
 
开发者ID:facebookarchive,项目名称:swift-hive-metastore,代码行数:10,代码来源:HiveMetastoreClientModule.java


示例7: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
protected void configure() {
    ThrowingProviderBinder.forModule(this);
    bindConstant().annotatedWith(Names.named("testOnly")).to(options.testOnly());
    bindConstant().annotatedWith(Names.named("skipFirst")).to(options.skipFirst());
    bindConstant().annotatedWith(Names.named("percentsBinningStep")).to(0.01);
    switch (options.format()) {
        case vw:
            bind(InputFormat.class).to(VowpalWabbitFormat.class);
            break;
        case csv:
            ColumnsMask columnsMask = new ColumnsMask(options.csvMask());
            bindConstant().annotatedWith(Names.named("csvDelimiter")).to(options.csvDelimiter());
            bind(new TypeLiteral<ColumnsMask>() {
            }).annotatedWith(Names.named("csvMask")).toInstance(columnsMask);
            bind(InputFormat.class).to(CSVFormat.class);
            break;
        case binary:
            bind(InputFormat.class).to(BinaryInputFormat.class);
            break;
        default:
            throw new IllegalArgumentException(options.format().toString());
    }
    bind(FirstPassRunner.class);
    bind(SecondPassRunner.class);
    bind(FeatureEngineeringRunner.class);
    bind(Phaser.class).asEagerSingleton();
    bind(FeaturesProcessor.class);
    try {
        bind(new TypeLiteral<Supplier<InputStream>>() {}).toInstance(this::openInputFile);
        bind(FastBufferedOutputStream.class).toInstance(new FastBufferedOutputStream(
                Files.newOutputStream(Paths.get(options.predictions()))));

    } catch (IOException e) {
        throw new IllegalArgumentException(e);
    }
    bind(NumericalFeaturesStatistics.class).asEagerSingleton();
    bind(new TypeLiteral<WorkHandler<TwoPhaseEvent<Void>>>() {
    })
            .to(StatisticsWorkHandler.class);
    bind(new TypeLiteral<WorkHandler<TwoPhaseEvent<SparseItem>>>() {
    })
            .to(BinningWorkHandler.class);
    bind(new TypeLiteral<EventHandler<TwoPhaseEvent<SparseItem>>>() {})
            .to(OutputWriterEventHandler.class);
}
 
开发者ID:scaled-ml,项目名称:Scaled-ML,代码行数:47,代码来源:FeatureEngineeringModule.java


示例8: configure

import com.google.inject.throwingproviders.ThrowingProviderBinder; //导入依赖的package包/类
@Override
protected void configure() {
  install(ThrowingProviderBinder.forModule(this));
}
 
开发者ID:SciGraph,项目名称:SciGraph,代码行数:5,代码来源:OpenNlpModule.java



注:本文中的com.google.inject.throwingproviders.ThrowingProviderBinder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BlockLeaves类代码示例发布时间:2022-05-23
下一篇:
Java BitmapUtils类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap