File tree 1 file changed +5
-5
lines changed
core/src/com/google/inject/multibindings
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import static com .google .inject .internal .RealOptionalBinder .newRealOptionalBinder ;
20
20
21
- import com .google .common .base .Optional ;
22
21
import com .google .inject .Binder ;
23
22
import com .google .inject .Key ;
24
23
import com .google .inject .TypeLiteral ;
35
34
* </ol>
36
35
*
37
36
* <p>When an OptionalBinder is added, it will always supply the bindings: {@code Optional<T>} and
38
- * {@code Optional<Provider<T>>}. If {@link #setBinding} or {@link #setDefault} are called, it will
39
- * also bind {@code T}.
37
+ * {@code Optional<Provider<T>>}. Both {@link java.util.Optional java.util.Optional} and {@link
38
+ * com.google.common.base.Optional com.google.common.base.Optional} are bound for compatibility. If
39
+ * {@link #setBinding} or {@link #setDefault} are called, it will also bind {@code T}.
40
40
*
41
41
* <p>{@code setDefault} is intended for use by frameworks that need a default value. User code can
42
42
* call {@code setBinding} to override the default. <b>Warning: Even if setBinding is called, the
66
66
* }
67
67
* }</code></pre>
68
68
*
69
- * <p>With this module, an {@link Optional}{@ code <Renamer>} can now be injected. With no other
70
- * bindings, the optional will be absent. Users can specify bindings in one of two ways:
69
+ * <p>With this module, an {@code Optional <Renamer>} can now be injected. With no other bindings,
70
+ * the optional will be absent. Users can specify bindings in one of two ways:
71
71
*
72
72
* <p>Option 1:
73
73
*
You can’t perform that action at this time.
0 commit comments