| <!DOCTYPE html> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" /> |
| <title> |
| |
| FactoryProvider |
| |
| |
| | Guice |
| |
| </title> |
| <link href="../../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> |
| <link href="../../../../../assets/customizations.css" rel="stylesheet" type="text/css" /> |
| <script src="../../../../../assets/search_autocomplete.js" type="text/javascript"></script> |
| <script src="../../../../../assets/jquery-resizable.min.js" type="text/javascript"></script> |
| <script src="../../../../../assets/android-developer-docs.js" type="text/javascript"></script> |
| <script src="../../../../../assets/prettify.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| setToRoot("../../../../../"); |
| </script> |
| <script src="../../../../../assets/android-developer-reference.js" type="text/javascript"></script> |
| <script src="../../../../../assets/navtree_data.js" type="text/javascript"></script> |
| <script src="../../../../../assets/customizations.js" type="text/javascript"></script> |
| <noscript> |
| <style type="text/css"> |
| html,body{overflow:auto;} |
| #body-content{position:relative; top:0;} |
| #doc-content{overflow:visible;border-left:3px solid #666;} |
| #side-nav{padding:0;} |
| #side-nav .toggle-list ul {display:block;} |
| #resize-packages-nav{border-bottom:3px solid #666;} |
| </style> |
| </noscript> |
| </head> |
| |
| <body class="Guice_2.0"> |
| |
| <div id="header"> |
| <div id="headerLeft"> |
| |
| <span id="masthead-title">Guice</span> |
| |
| </div> |
| <div id="headerRight"> |
| |
| <div id="search" > |
| <div id="searchForm"> |
| <form accept-charset="utf-8" class="gsc-search-box" |
| onsubmit="return submit_search()"> |
| <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody> |
| <tr> |
| <td class="gsc-input"> |
| <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off" |
| title="search developer docs" name="q" |
| value="search developer docs" |
| onFocus="search_focus_changed(this, true)" |
| onBlur="search_focus_changed(this, false)" |
| onkeydown="return search_changed(event, true, '../../../../../')" |
| onkeyup="return search_changed(event, false, '../../../../../')" /> |
| <div id="search_filtered_div" class="no-display"> |
| <table id="search_filtered" cellspacing=0> |
| </table> |
| </div> |
| </td> |
| <td class="gsc-search-button"> |
| <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" /> |
| </td> |
| <td class="gsc-clear-button"> |
| <div title="clear results" class="gsc-clear-button"> </div> |
| </td> |
| </tr></tbody> |
| </table> |
| </form> |
| </div><!-- searchForm --> |
| </div><!-- search --> |
| |
| |
| <div id="api-level-toggle"> |
| <input type="checkbox" id="apiLevelCheckbox" onclick="toggleApiLevelSelector(this)" /> |
| <label for="apiLevelCheckbox" class="disabled">Filter by API Level: </label> |
| <select id="apiLevelSelector"> |
| <!-- option elements added by buildApiLevelSelector() --> |
| </select> |
| </div> |
| <script> |
| var SINCE_DATA = [ 'Guice_1.0', 'Guice_2.0' ]; |
| buildApiLevelSelector(); |
| addLoadEvent(changeApiLevel); |
| </script> |
| |
| |
| |
| </div> |
| </div><!-- header --> |
| |
| |
| <div class="g-section g-tpl-240" id="body-content"> |
| <div class="g-unit g-first side-nav-resizable" id="side-nav"> |
| <div id="swapper"> |
| <div id="nav-panels"> |
| <div id="resize-packages-nav"> |
| <div id="packages-nav"> |
| <div id="index-links"><nobr> |
| <a href="../../../../../reference/packages.html" >Package Index</a> | |
| <a href="../../../../../reference/classes.html" >Class Index</a></nobr> |
| </div> |
| <ul> |
| |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/package-summary.html">com.google.inject</a></li> |
| <li class="selected api apilevel-Guice_2.0"> |
| <a href="../../../../../reference/com/google/inject/assistedinject/package-summary.html">com.google.inject.assistedinject</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/binder/package-summary.html">com.google.inject.binder</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/jndi/package-summary.html">com.google.inject.jndi</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/matcher/package-summary.html">com.google.inject.matcher</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../../reference/com/google/inject/multibindings/package-summary.html">com.google.inject.multibindings</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/name/package-summary.html">com.google.inject.name</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/servlet/package-summary.html">com.google.inject.servlet</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/spi/package-summary.html">com.google.inject.spi</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../../reference/com/google/inject/throwingproviders/package-summary.html">com.google.inject.throwingproviders</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../../reference/com/google/inject/tools/jmx/package-summary.html">com.google.inject.tools.jmx</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../../reference/com/google/inject/util/package-summary.html">com.google.inject.util</a></li> |
| </ul><br/> |
| </div> <!-- end packages --> |
| </div> <!-- end resize-packages --> |
| <div id="classes-nav"> |
| <ul> |
| |
| |
| <li><h2>Classes</h2> |
| <ul> |
| <li class="selected api apilevel-Guice_2.0"><a href="../../../../../reference/com/google/inject/assistedinject/FactoryProvider.html">FactoryProvider</a><F></li> |
| </ul> |
| </li> |
| |
| |
| |
| </ul><br/> |
| </div><!-- end classes --> |
| </div><!-- end nav-panels --> |
| <div id="nav-tree" style="display:none"> |
| <div id="index-links"><nobr> |
| <a href="../../../../../reference/packages.html" >Package Index</a> | |
| <a href="../../../../../reference/classes.html" >Class Index</a></nobr> |
| </div> |
| </div><!-- end nav-tree --> |
| </div><!-- end swapper --> |
| </div> <!-- end side-nav --> |
| <script> |
| if (!isMobile) { |
| $("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav"); |
| chooseDefaultNav(); |
| if ($("#nav-tree").is(':visible')) { |
| init_default_navtree("../../../../../"); |
| } else { |
| addLoadEvent(function() { |
| scrollIntoView("packages-nav"); |
| scrollIntoView("classes-nav"); |
| }); |
| } |
| $("#swapper").css({borderBottom:"2px solid #aaa"}); |
| } else { |
| swapNav(); // tree view should be used on mobile |
| } |
| </script> |
| |
| |
| |
| <div class="g-unit" id="doc-content"> |
| |
| <div id="api-info-block"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="sum-details-links"> |
| |
| Summary: |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="#pubmethods">Methods</a> |
| |
| |
| |
| |
| | <a href="#inhmethods">Inherited Methods</a> |
| |
| | <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> |
| |
| </div><!-- end sum-details-links --> |
| <div class="api-level"> |
| |
| |
| Since: <a href="../../../../../guide/appendix/api-levels.html#levelGuice_2.0">API Level Guice_2.0</a> |
| |
| |
| |
| |
| |
| </div> |
| </div><!-- end api-info-block --> |
| |
| |
| <!-- ======== START OF CLASS DATA ======== --> |
| |
| <div id="jd-header"> |
| public |
| |
| |
| |
| class |
| <h1>FactoryProvider</h1> |
| |
| |
| |
| |
| extends <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Object.html">Object</a><br/> |
| |
| |
| |
| |
| |
| |
| implements |
| |
| <a href="../../../../../reference/com/google/inject/Provider.html">Provider</a><T> |
| |
| <a href="../../../../../reference/com/google/inject/spi/HasDependencies.html">HasDependencies</a> |
| |
| |
| |
| |
| |
| </div><!-- end header --> |
| |
| <div id="naMessage"></div> |
| |
| <div id="jd-content" class="api apilevel-Guice_2.0"> |
| <table class="jd-inheritance-table"> |
| |
| |
| <tr> |
| |
| <td colspan="2" class="jd-inheritance-class-cell"><a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Object.html">java.lang.Object</a></td> |
| </tr> |
| |
| |
| <tr> |
| |
| <td class="jd-inheritance-space"> ↳</td> |
| |
| <td colspan="1" class="jd-inheritance-class-cell">com.google.inject.assistedinject.FactoryProvider<F></td> |
| </tr> |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| <div class="jd-descr"> |
| |
| |
| <h2>Class Overview</h2> |
| <p>Provides a factory that combines the caller's arguments with injector-supplied values to |
| construct objects. |
| |
| <h3>Defining a factory</h3> |
| Create an interface whose methods return the constructed type, or any of its supertypes. The |
| method's parameters are the arguments required to build the constructed type. |
| <pre>public interface PaymentFactory { |
| Payment create(Date startDate, Money amount); |
| }</pre> |
| You can name your factory methods whatever you like, such as <i>create</i>, <i>createPayment</i> |
| or <i>newPayment</i>. |
| |
| <h3>Creating a type that accepts factory parameters</h3> |
| <code>constructedType</code> is a concrete class with an @<code><a href="../../../../../reference/com/google/inject/Inject.html">Inject</a></code>-annotated |
| constructor. In addition to injector-supplied parameters, the constructor should have |
| parameters that match each of the factory method's parameters. Each factory-supplied parameter |
| requires an @<code><a href="../../../../../reference/com/google/inject/assistedinject/Assisted.html">Assisted</a></code> annotation. This serves to document that the parameter |
| is not bound by your application's modules. |
| <pre>public class RealPayment implements Payment { |
| @Inject |
| public RealPayment( |
| CreditService creditService, |
| AuthService authService, |
| <strong>@Assisted Date startDate</strong>, |
| <strong>@Assisted Money amount</strong>) { |
| ... |
| } |
| }</pre> |
| Any parameter that permits a null value should also be annotated <code>@Nullable</code>. |
| |
| <h3>Configuring factories</h3> |
| In your <code><a href="../../../../../reference/com/google/inject/Module.html">module</a></code>, bind the factory interface to the returned |
| factory: |
| <pre>bind(PaymentFactory.class).toProvider( |
| FactoryProvider.newFactory(PaymentFactory.class, RealPayment.class));</pre> |
| As a side-effect of this binding, Guice will inject the factory to initialize it for use. The |
| factory cannot be used until the injector has been initialized. |
| |
| <h3>Using the factory</h3> |
| Inject your factory into your application classes. When you use the factory, your arguments |
| will be combined with values from the injector to construct an instance. |
| <pre>public class PaymentAction { |
| @Inject private PaymentFactory paymentFactory; |
| |
| public void doPayment(Money amount) { |
| Payment payment = paymentFactory.create(new Date(), amount); |
| payment.apply(); |
| } |
| }</pre> |
| |
| <h3>Making parameter types distinct</h3> |
| The types of the factory method's parameters must be distinct. To use multiple parameters of |
| the same type, use a named @<code><a href="../../../../../reference/com/google/inject/assistedinject/Assisted.html">Assisted</a></code> annotation to disambiguate the |
| parameters. The names must be applied to the factory method's parameters: |
| |
| <pre>public interface PaymentFactory { |
| Payment create( |
| <strong>@Assisted("startDate")</strong> Date startDate, |
| <strong>@Assisted("dueDate")</strong> Date dueDate, |
| Money amount); |
| } </pre> |
| ...and to the concrete type's constructor parameters: |
| <pre>public class RealPayment implements Payment { |
| @Inject |
| public RealPayment( |
| CreditService creditService, |
| AuthService authService, |
| <strong>@Assisted("startDate")</strong> Date startDate, |
| <strong>@Assisted("dueDate")</strong> Date dueDate, |
| <strong>@Assisted</strong> Money amount) { |
| ... |
| } |
| }</pre> |
| |
| <h3>Values are created by Guice</h3> |
| Returned factories use child injectors to create values. The values are eligible for method |
| interception. In addition, @Inject members will be injected before they are |
| returned. |
| |
| <h3>Backwards compatibility using @AssistedInject</h3> |
| Instead of the @Inject annotation, you may annotate the constructed classes with |
| @<code><a href="../../../../../reference/com/google/inject/assistedinject/AssistedInject.html">AssistedInject</a></code>. This triggers a limited backwards-compatability mode. |
| |
| <p>Instead of matching factory method arguments to constructor parameters using their names, the |
| <strong>parameters are matched by their order</strong>. The first factory method argument is |
| used for the first @Assisted constructor parameter, etc.. Annotation names have no |
| effect. |
| |
| <p>Returned values are <strong>not created by Guice</strong>. These types are not eligible for |
| method interception. They do receive post-construction member injection.</p> |
| |
| |
| |
| |
| |
| </div><!-- jd-descr --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="jd-descr"> |
| |
| |
| <h2>Summary</h2> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_2.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| F</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../../reference/com/google/inject/assistedinject/FactoryProvider.html#get()">get</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Provides an instance of <code>T</code>.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-Guice_2.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/util/Set.html">Set</a><<a href="../../../../../reference/com/google/inject/spi/Dependency.html">Dependency</a><?>></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../../reference/com/google/inject/assistedinject/FactoryProvider.html#getDependencies()">getDependencies</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Returns the known dependencies for this type.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_2.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| static |
| <F> |
| <a href="../../../../../reference/com/google/inject/Provider.html">Provider</a><F></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../../reference/com/google/inject/assistedinject/FactoryProvider.html#newFactory(java.lang.Class<F>, java.lang.Class<?>)">newFactory</a></span>(<a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Class.html">Class</a><F> factoryType, <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Class.html">Class</a><?> implementationType)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-Guice_2.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| static |
| <F> |
| <a href="../../../../../reference/com/google/inject/Provider.html">Provider</a><F></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../../reference/com/google/inject/assistedinject/FactoryProvider.html#newFactory(com.google.inject.TypeLiteral<F>, com.google.inject.TypeLiteral<?>)">newFactory</a></span>(<a href="../../../../../reference/com/google/inject/TypeLiteral.html">TypeLiteral</a><F> factoryType, <a href="../../../../../reference/com/google/inject/TypeLiteral.html">TypeLiteral</a><?> implementationType)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="inhmethods" class="jd-sumtable"><tr><th> |
| <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> |
| <div style="clear:left;">Inherited Methods</div></th></tr> |
| |
| |
| <tr class="api apilevel-" > |
| <td colspan="12"> |
| <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" |
| ><img id="inherited-methods-java.lang.Object-trigger" |
| src="../../../../../assets/images/triangle-closed.png" |
| class="jd-expando-trigger-img" /></a> |
| From class |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Object.html">java.lang.Object</a> |
| |
| <div id="inherited-methods-java.lang.Object"> |
| <div id="inherited-methods-java.lang.Object-list" |
| class="jd-inheritedlinks"> |
| </div> |
| <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> |
| <table class="jd-sumtable-expando"> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Object.html">Object</a></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">clone</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">equals</span>(<a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Object.html">Object</a> arg0)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">finalize</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Class.html">Class</a><?></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">getClass</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">hashCode</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">notify</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">notifyAll</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/String.html">String</a></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">toString</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>(long arg0, int arg1)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>(long arg0)</nobr> |
| |
| </td></tr> |
| |
| |
| </table> |
| </div> |
| </div> |
| </td></tr> |
| |
| |
| |
| <tr class="api apilevel-" > |
| <td colspan="12"> |
| <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.google.inject.Provider" class="jd-expando-trigger closed" |
| ><img id="inherited-methods-com.google.inject.Provider-trigger" |
| src="../../../../../assets/images/triangle-closed.png" |
| class="jd-expando-trigger-img" /></a> |
| From interface |
| |
| <a href="../../../../../reference/com/google/inject/Provider.html">com.google.inject.Provider</a> |
| |
| <div id="inherited-methods-com.google.inject.Provider"> |
| <div id="inherited-methods-com.google.inject.Provider-list" |
| class="jd-inheritedlinks"> |
| </div> |
| <div id="inherited-methods-com.google.inject.Provider-summary" style="display: none;"> |
| <table class="jd-sumtable-expando"> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_1.0" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| T</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../../reference/com/google/inject/Provider.html#get()">get</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Provides an instance of <code>T</code>.</div> |
| |
| </td></tr> |
| |
| |
| </table> |
| </div> |
| </div> |
| </td></tr> |
| |
| |
| |
| <tr class="api apilevel-" > |
| <td colspan="12"> |
| <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.google.inject.spi.HasDependencies" class="jd-expando-trigger closed" |
| ><img id="inherited-methods-com.google.inject.spi.HasDependencies-trigger" |
| src="../../../../../assets/images/triangle-closed.png" |
| class="jd-expando-trigger-img" /></a> |
| From interface |
| |
| <a href="../../../../../reference/com/google/inject/spi/HasDependencies.html">com.google.inject.spi.HasDependencies</a> |
| |
| <div id="inherited-methods-com.google.inject.spi.HasDependencies"> |
| <div id="inherited-methods-com.google.inject.spi.HasDependencies-list" |
| class="jd-inheritedlinks"> |
| </div> |
| <div id="inherited-methods-com.google.inject.spi.HasDependencies-summary" style="display: none;"> |
| <table class="jd-sumtable-expando"> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_2.0" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/util/Set.html">Set</a><<a href="../../../../../reference/com/google/inject/spi/Dependency.html">Dependency</a><?>></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../../reference/com/google/inject/spi/HasDependencies.html#getDependencies()">getDependencies</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Returns the known dependencies for this type.</div> |
| |
| </td></tr> |
| |
| |
| </table> |
| </div> |
| </div> |
| </td></tr> |
| |
| |
| </table> |
| |
| |
| </div><!-- jd-descr (summary) --> |
| |
| <!-- Details --> |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- XML Attributes --> |
| |
| |
| <!-- Enum Values --> |
| |
| |
| <!-- Constants --> |
| |
| |
| <!-- Fields --> |
| |
| |
| <!-- Public ctors --> |
| |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <!-- Protected ctors --> |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| <!-- Public methdos --> |
| |
| <h2>Public Methods</h2> |
| |
| |
| |
| <A NAME="get()"></A> |
| |
| <div class="jd-details api apilevel-Guice_2.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| F |
| </span> |
| <span class="sympad">get</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../../guide/appendix/api-levels.html#levelGuice_2.0">API Level Guice_2.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Provides an instance of <code>T</code>. Must never return <code>null</code>.</p></div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getDependencies()"></A> |
| |
| <div class="jd-details api apilevel-Guice_2.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/util/Set.html">Set</a><<a href="../../../../../reference/com/google/inject/spi/Dependency.html">Dependency</a><?>> |
| </span> |
| <span class="sympad">getDependencies</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../../guide/appendix/api-levels.html#levelGuice_2.0">API Level Guice_2.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns the known dependencies for this type. If this has dependencies whose values are not |
| known statically, a dependency for the <code><a href="../../../../../reference/com/google/inject/Injector.html">Injector</a></code> will be |
| included in the returned set.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>a possibly empty set |
| </li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="newFactory(java.lang.Class<F>, java.lang.Class<?>)"></A> |
| |
| <div class="jd-details api apilevel-Guice_2.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| |
| |
| |
| <a href="../../../../../reference/com/google/inject/Provider.html">Provider</a><F> |
| </span> |
| <span class="sympad">newFactory</span> |
| <span class="normal">(<a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Class.html">Class</a><F> factoryType, <a href="http://download.oracle.com/javase/6/docs/api/index.html?java/lang/Class.html">Class</a><?> implementationType)</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../../guide/appendix/api-levels.html#levelGuice_2.0">API Level Guice_2.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="newFactory(com.google.inject.TypeLiteral<F>, com.google.inject.TypeLiteral<?>)"></A> |
| |
| <div class="jd-details api apilevel-Guice_2.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| |
| |
| |
| <a href="../../../../../reference/com/google/inject/Provider.html">Provider</a><F> |
| </span> |
| <span class="sympad">newFactory</span> |
| <span class="normal">(<a href="../../../../../reference/com/google/inject/TypeLiteral.html">TypeLiteral</a><F> factoryType, <a href="../../../../../reference/com/google/inject/TypeLiteral.html">TypeLiteral</a><?> implementationType)</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../../guide/appendix/api-levels.html#levelGuice_2.0">API Level Guice_2.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| |
| |
| |
| <!-- ========= END OF CLASS DATA ========= --> |
| <A NAME="navbar_top"></A> |
| |
| <div id="footer"> |
| |
| </div> <!-- end footer --> |
| |
| </div> <!-- jd-content --> |
| |
| </div><!-- end doc-content --> |
| |
| </div> <!-- end body-content --> |
| |
| <script type="text/javascript"> |
| init(); /* initialize android-developer-docs.js */ |
| </script> |
| |
| </body> |
| </html> |