guice

guice

 英

  • 网络叫我怎能不爱你

例句

According to the Guice best practices guide, constructor injection is the preferred way to ask for your dependencies.

根据Guice最佳实践指南构造函数注入询问依赖项首选方式

If you don't ask Guice to create FrogMan, the annotation has no effect on the code's behavior.

如果要求Guice构建FrogMan这个注释代码行为没有任何影响

Note that Guice can be used in OSGi without Sisu; the 3. 0 release provides standard OSGi interoperation out of the box.

需要注意没有Sisu,Guice自身可用OSGi3.0版本提供了标准OSGi互操作

Unlike Guice, our DI has a concept of scope lifecycle which is very important for a framework like Cayenne.

Guice不同我们DI作用域生命周期概念这个概念Cayenne这样框架来说非常重要

However, the most direct influences are the contextual state management model of Seam and the type safe dependency injection model of Guice.

但是最最直接影响来自Seam上下文状态管理模型Guice类型安全依赖注入

One effective refactoring strategy is to introduce to the application a dependency injection 16 container like Spring or Google Guice.

有效一个战略程序引入一个依赖注射16容器例如Spring或者GoogleGuice

Interesting - the tie in to Seam is obvious, but this is the first I've seen of any involvement from the Guice team. . .

非常有趣——其中Seam明显联系第一次看到任何Guice团队牵连东西……

This means Guice will keep the refinery around, and whenever another instance requires a fuel source, Guice will inject the same refinery.

意味Guice一直保持提炼可用只要另一个实例需要燃料Guice就会注入相同提炼”。

All three versions of FrogMan exhibit the same behavior: Guice injects the appropriate Vehicle when they're constructed.

三个FrogMan版本展示相同行为Guice构建注入相应Vehicle

Currently, Jersey can integrate with Spring, Guice, and can support ATOM representation with apache-adbera integration.

目前Jersey可以集成SpringGuice支持ATOM表示形式apache-adbera集成

Guice and EasyMock stand out as two frameworks I have been using that have used the power of generics to implement extraordinary typesafety.

GuiceEasyMock比较优秀框架它们利用泛型实现突出类型安全

Guice and other DI frameworks serve as flexible "super factories" that you configure to build your objects.

Guice其他DI框架作为超级工厂”,可以通过配置它们构建对象

Developers have contributed Spring, Seam and Guice service adapters.

开发人员已经编写SpringSeamGuice服务适配器

You rely on Guice to provide your dependencies, even when you're configuring your Guice module itself.

依靠Guice提供依赖项即使配置Guice模块本身

Based on the return type of Hero, it works out that when you ask for a hero, it should call this method to provide it.

根据Hero返回类型请求某个heroGuice进行计算应该调用provider方法提供hero

Write your business logic with session beans, Spring, Guice, or Pojo services.

会话BeanSpringGuicePojo服务业务逻辑

Familiarity with Guice, or with another dependency injection framework such as Spring, would be useful.

熟悉一下GuiceSpring其他依赖注入框架有用

To keep the work manageable, you can store the Guice Injector somewhere and call it directly.

为了使工作易于管理可以GuiceInjector存储某处直接调用

Let's dive into Guice, starting with the @Inject annotation and modules.

现在我们@Inject注释模块开始深入讨论Guice

Guice automatically injects the provider method in Listing 15 with the correct arguments.

清单15Guice自动使用正确参数注入provider方法

by Dhanji R. Prasanna is a book that tries to explore the DI idiom in detail, and present techniques in Spring and Guice.

DhanjiR.Prasanna著作依赖注入力图详细探究依赖注入领域呈现SpringGuice技术著作

Like Guice, it makes aggressive use of annotations to keep configuration as part of the code.

Guice一样大量使用注释配置作为代码一部分

Guice calls this method immediately after it constructs my hero.

Guice构造hero之后立即调用方法

Dhanji: Sure, the primary principles are conciseness and type-safety, just like Guice.

Dhanji当然可以主要原则就是简洁类型安全Guice那样

If you're familiar with Guice, the code above should look familiar.

如果熟悉Guice上述代码应该看起来眼熟

Provider methods are an excellent way to integrate other libraries into your Guice module.

provider方法其他集成Guice模块很好方式

Guice offers you an option when you select scopes.

选择作用域Guice提供一个选项

With Spring 2. 5 nearing release, some people have compared it's performance to Google's Guice framework.

随着Spring2.5发布日期临近一些开始比较GoogleGuice框架之间性能差别

This is the first way of getting Guice to construct your objects: asking explicitly.

Guice构造对象第一方式显式询问

With Guice 2. 0 we even support a DSL to intuitively map servlets and filters to URL paths in web applications.

Guice2.0我们支持一个DSL可以web应用中将servlet过滤器映射URL路径

This means it won't interfere with applications' use of Spring, Guice, etc.

意味不会影响应用使用SpringGuice

Finally, Sitebricks is built directly on top of Guice.

最后Sitebricks直接构建Guice之上

You can find more information on Dependency Injection right here on InfoQ!

可以InfoQ依赖注入GuiceSpring专辑找到更多信息

Duskis also created a Guice-style Spring 2. 5 application, and discussed his experience in detail.

Duskis创建一个GuiceSpring2.5应用并且详细论述二者差别

You will not have to create or edit a lot of XML files to use Guice.

使用Guice需要创建编辑大量XML文件

I think Dependency Inversion is so important that I want to invert the dependencies on Guice!

认为依赖倒置非常重要因此打算转换Guice依赖

However, Guice cares only about @Inject; your method can be named anything you like, and it can take multiple parameters.

不过Guice关心@Inject;可以任意命名这个方法可以带有多个参数

There are some static analysis tools we use to describe and analyze application structure (like Guice's grapher, for example).

我们有一些分析工具用来描述分析应用结构例如Guicegrapher)。

Providers shouldn't be confused with provider methods. (In Guice 1. 0, they were considerably harder to tell apart. )

不要提供者provider方法弄混淆Guice1.0,两者区分开来)。

However, I prefer constructor injection, as do Guice's authors. Here's a quick analysis of the three styles

不过Guice作者一样更喜欢构造函数注入