com.google.inject.throwingproviders.ThrowingProviderBinder Java Examples
The following examples show how to use
com.google.inject.throwingproviders.ThrowingProviderBinder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultModule.java From bromium with MIT License | 5 votes |
@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)); }
Example #2
Source File: ThunderbirdModule.java From mail-importer with Apache License 2.0 | 5 votes |
@Override protected void configure() { ThrowingProviderBinder.create(binder()) .bind(MailProvider.class, LocalStorage.class) .to(ThunderbirdMailbox.class); bind(XMozillaStatusParser.class); }
Example #3
Source File: OpenNlpModule.java From SciGraph with Apache License 2.0 | 4 votes |
@Override protected void configure() { install(ThrowingProviderBinder.forModule(this)); }