<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> | |
<HTML> | |
<HEAD> | |
<meta name="generator" content="JDiff v1.1.1"> | |
<!-- Generated by the JDiff Javadoc doclet --> | |
<!-- (http://www.jdiff.org) --> | |
<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared."> | |
<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet"> | |
<LINK REL="stylesheet" TYPE="text/css" HREF="../stylesheet-jdiff.css" TITLE="Style"> | |
<TITLE> | |
com.google.inject.throwingproviders Documentation Differences | |
</TITLE> | |
</HEAD> | |
<BODY> | |
<!-- Start of nav bar --> | |
<TABLE summary="Navigation bar" BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<TABLE summary="Navigation bar" BORDER="0" CELLPADDING="0" CELLSPACING="3"> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://google-guice.googlecode.com/git/latest-api-diffs/4.0/javadoc/com/google/inject/throwingproviders/package-summary.html" target="_top"><FONT CLASS="NavBarFont1"><B><tt>4.0</tt></B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="changes-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="docdiffs_index.html"><FONT CLASS="NavBarFont1"><B>Text Changes</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="jdiff_statistics.html"><FONT CLASS="NavBarFont1"><B>Statistics</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="jdiff_help.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Generated by<br><a href="http://www.jdiff.org" class="staysblack" target="_top">JDiff</a></b></EM></TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="docdiffs_com.google.inject.spi.html"><B>PREV PACKAGE</B></A> | |
<B>NEXT PACKAGE</B> | |
| |
<A HREF="../changes.html" TARGET="_top"><B>FRAMES</B></A> | |
<A HREF="docdiffs_com.google.inject.throwingproviders.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell2"> </TD> | |
</TR> | |
</TABLE> | |
<HR> | |
<!-- End of nav bar --> | |
<h2> | |
com.google.inject.throwingproviders Documentation Differences | |
</h2> | |
<blockquote> | |
This file contains all the changes in documentation in the package <code>com.google.inject.throwingproviders</code> as colored differences. | |
Deletions are shown <strike>like this</strike>, and | |
additions are shown <span style="background: #FFFF00">like this</span>. | |
</blockquote> | |
<blockquote> | |
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The <i>new</i> 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. | |
</blockquote> | |
<blockquote> | |
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. | |
</blockquote> | |
<hr> | |
<A NAME="com.google.inject.throwingproviders.ThrowingProviderBinder!class"></A><a href="com.google.inject.throwingproviders.ThrowingProviderBinder.html" class="hiddenlink">Class <b>ThrowingProviderBinder</b></a><br><br><blockquote><p>Builds a binding for a <A HREF="http://google-guice.googlecode.com/git/latest-api-diffs/4.0/javadoc/com/google/inject/throwingproviders/ThrowingProviderBinder/CheckedProvider.html"><TT>CheckedProvider</TT></A>. | |
<p>You can use a fluent API and custom providers: | |
<pre><code>ThrowingProviderBinder.create(binder()) | |
.bind(RemoteProvider.class, Customer.class) | |
.to(RemoteCustomerProvider.class) | |
.in(RequestScope.class); | |
</code></pre> | |
or, you can use throwing provider methods: | |
<pre><code>class MyModule extends AbstractModule { | |
configure() { | |
ThrowingProviderBinder.install(this, binder()); | |
} | |
{@literal @}CheckedProvides(RemoteProvider.class) | |
{@literal @}RequestScope | |
Customer provideCustomer(FlakyCustomerCreator creator) throws RemoteException { | |
return creator.getCustomerOrThrow(); | |
} | |
} | |
</code></pre> | |
<span style="background: #FFFF00">You also can declare that a CheckedProvider construct | |
a particular class whose constructor throws an exception: | |
<pre><code>ThrowingProviderBinder.create(binder()) | |
.bind(RemoteProvider.class, Customer.class) | |
.providing(CustomerImpl.class) | |
.in(RequestScope.class); | |
</code></pre> | |
</span> | |
@author jmourits@google.com (Jerome Mourits) | |
@author jessewilson@google.com (Jesse Wilson)<span style="background: #FFFF00"> | |
@author sameb@google.com (Sam Berlin)</span></blockquote> | |
</BODY> | |
</HTML> |