Google Guice提供了一些很好的依赖注入功能。Google Guice的隐藏功能
例如:
我整个@Nullable功能最近,它允许您标记构造函数的参数为可选(允许为空),因为吉斯默认情况下不会允许这些来
public Person(String firstName, String lastName, @Nullable Phone phone) {
this.firstName = checkNotNull(firstName, "firstName");
this.lastName = checkNotNull(lastName, "lastName");
this.phone = phone;
}
https://github.com/google/guice/wiki/UseNullable
什么是人使用吉斯(尤其是不太明显的)的其他有用的功能?的
这是一个隐藏的功能?这是最佳做法指南,即从主页面点击两次。 – 2010-04-26 21:29:01
实际上,如果你想对它进行迂腐......! – Jon 2010-04-26 23:56:33