|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagecom.google.inject.throwingproviders
as colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.
Alternative to the Guice com.google.inject.Provider that throws a checked Exception. Users may not inject {@code T} directly.This interface must be extended to use application-specific exception types. Such subinterfaces may not define new methods:
public interface RemoteProvider<T> extends ThrowingProvider<T, RemoteException> { }When this type is bound using ThrowingProviderBinder, the value returned or exception thrown by .get will be scoped. As a consequence, .get will invoked at most once within each scope. @author jmourits@google.com (Jerome Mourits) @author jessewilson@google.com (Jesse Wilson) @deprecated use CheckedProvider instead.
Builds a binding for a
ThrowingProviderCheckedProvider.You can
usinguse a fluent API and custom providers:or, you can use throwing provider methods:ThrowingProviderBinder.create(binder()) .bind(RemoteProvider.class, Customer.class) .to(RemoteCustomerProvider.class) .in(RequestScope.class);
@author jmourits@google.com (Jerome Mourits) @author jessewilson@google.com (Jesse Wilson)class MyModule extends AbstractModule { configure() { ThrowingProviderBinder.install(this, binder()); } {@literal @}CheckedProvides(RemoteProvider.class) {@literal @}RequestScope Customer provideCustomer(FlakyCustomerCreator creator) throws RemoteException { return creator.getCustomerOrThrow(); } }