0

常量如何被程序/类与 gwt/gin 绑定?

代替:

bindConstant().annotatedWith(AString.class).to("XYZ");

我们需要:(显然,它不会编译)

bindConstant().annotatedWith(AString.class).to(CustomStringProvider.class);

因为这个常量存储在 cookie/离线存储中。

4

1 回答 1

0

你不能简单bind(String.class).annotatedWith(AString.class).toProvider(CustomStringProvider.class)吗?

如果你有一个提供者,它显然不是一个常量

于 2011-12-15T14:52:41.210 回答