Annotation Interface CheckedProvides
Annotates methods of a
Module
to create a CheckedProvider
method binding that can throw exceptions. The method's return type is bound to a CheckedProvider
that can be injected. Guice will pass dependencies to the method as parameters.
Install @CheckedProvides methods by using ThrowingProviderBinder.forModule(com.google.inject.Module)
on the module where the methods are
declared.- Since:
- 3.0
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<? extends CheckedProvider>
The interface that provides this value, a subinterface ofCheckedProvider
. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Whether exceptions should be put into the Guice scope.
-
Element Details
-
value
Class<? extends CheckedProvider> valueThe interface that provides this value, a subinterface ofCheckedProvider
.
-
-
-
scopeExceptions
boolean scopeExceptionsWhether exceptions should be put into the Guice scope. Default behavior is that exceptions are scoped.- Since:
- 4.0
- Default:
- true
-