| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>Instance</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Instance"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":18,"i3":6,"i4":6,"i5":6,"i6":6,"i7":18}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/enterprise/inject/InjectionException.html" title="class in javax.enterprise.inject"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../javax/enterprise/inject/Intercepted.html" title="annotation in javax.enterprise.inject"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/enterprise/inject/Instance.html" target="_top">Frames</a></li> |
| <li><a href="Instance.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">javax.enterprise.inject</div> |
| <h2 title="Interface Instance" class="title">Interface Instance<T></h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the required bean type</dd> |
| </dl> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd>java.lang.Iterable<T>, <a href="../../../javax/inject/Provider.html" title="interface in javax.inject">Provider</a><T></dd> |
| </dl> |
| <dl> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><a href="../../../javax/enterprise/inject/se/SeContainer.html" title="interface in javax.enterprise.inject.se">SeContainer</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../javax/enterprise/inject/spi/CDI.html" title="class in javax.enterprise.inject.spi">CDI</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">Instance<T></span> |
| extends java.lang.Iterable<T>, <a href="../../../javax/inject/Provider.html" title="interface in javax.inject">Provider</a><T></pre> |
| <div class="block"><p> |
| Allows the application to dynamically obtain instances of beans with a specified combination of required type and qualifiers. |
| </p> |
| |
| <p> |
| In certain situations, injection is not the most convenient way to obtain a contextual reference. For example, it may not be |
| used when: |
| </p> |
| |
| <ul> |
| <li>the bean type or qualifiers vary dynamically at runtime, or</li> |
| <li>depending upon the deployment, there may be no bean which satisfies the type and qualifiers, or</li> |
| <li>we would like to iterate over all beans of a certain type.</li> |
| </ul> |
| |
| <p> |
| In these situations, an instance of the <tt>Instance</tt> may be injected: |
| </p> |
| |
| <pre> |
| @Inject |
| Instance<PaymentProcessor> paymentProcessor; |
| </pre> |
| |
| <p> |
| Any combination of qualifiers may be specified at the injection point: |
| </p> |
| |
| <pre> |
| @Inject |
| @PayBy(CHEQUE) |
| Instance<PaymentProcessor> chequePaymentProcessor; |
| </pre> |
| |
| <p> |
| Or, the <a href="../../../javax/enterprise/inject/Any.html" title="annotation in javax.enterprise.inject"><code>@Any</code></a> qualifier may be used, allowing the application to specify qualifiers |
| dynamically: |
| </p> |
| |
| <pre> |
| @Inject |
| @Any |
| Instance<PaymentProcessor> anyPaymentProcessor; |
| </pre> |
| |
| <p> |
| Finally, the <a href="../../../javax/enterprise/inject/New.html" title="annotation in javax.enterprise.inject"><code>@New</code></a> qualifier may be used, allowing the application to obtain a |
| <a href="../../../javax/enterprise/inject/New.html" title="annotation in javax.enterprise.inject"><code>@New</code></a> qualified bean: |
| </p> |
| |
| <pre> |
| @Inject |
| @New(ChequePaymentProcessor.class) |
| Instance<PaymentProcessor> chequePaymentProcessor; |
| </pre> |
| |
| <p> |
| For an injected <tt>Instance</tt>: |
| </p> |
| |
| <ul> |
| <li>the <em>required type</em> is the type parameter specified at the injection point, and</li> |
| <li>the <em>required qualifiers</em> are the qualifiers specified at the injection point.</li> |
| </ul> |
| |
| <p> |
| The inherited <a href="../../../javax/inject/Provider.html#get--"><code>Provider.get()</code></a> method returns a contextual references for the unique bean that matches the |
| required type and required qualifiers and is eligible for injection into the class into which the parent <tt>Instance</tt> |
| was injected, or throws an <a href="../../../javax/enterprise/inject/UnsatisfiedResolutionException.html" title="class in javax.enterprise.inject"><code>UnsatisfiedResolutionException</code></a> or |
| <a href="../../../javax/enterprise/inject/AmbiguousResolutionException.html" title="class in javax.enterprise.inject"><code>AmbiguousResolutionException</code></a>. |
| </p> |
| |
| <pre> |
| PaymentProcessor pp = chequePaymentProcessor.get(); |
| </pre> |
| |
| <p> |
| The inherited <code>Iterable.iterator()</code> method returns an iterator over contextual references for beans that |
| match the required type and required qualifiers and are eligible for injection into the class into which the parent |
| <tt>Instance</tt> was injected. |
| </p> |
| |
| <pre> |
| for (PaymentProcessor pp : anyPaymentProcessor) |
| pp.test(); |
| </pre></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/inject/Provider.html#get--"><code>Provider.get()</code></a>, |
| <code>Iterable.iterator()</code>, |
| <a href="../../../javax/enterprise/util/AnnotationLiteral.html" title="class in javax.enterprise.util"><code>AnnotationLiteral</code></a>, |
| <a href="../../../javax/enterprise/util/TypeLiteral.html" title="class in javax.enterprise.util"><code>TypeLiteral</code></a></dd> |
| <dt><span class="simpleTagLabel">Examples (en):</span></dt> |
| <dd><a href="../../../../../../tomee-8.0/examples/cdi-dynamic-inject.html">cdi-dynamic-inject</a></dd> |
| <dt><span class="simpleTagLabel">Examples (pt):</span></dt> |
| <dd><a href="../../../../../../tomee-8.0/pt/examples/cdi-dynamic-inject.html">cdi-dynamic-inject</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#destroy-T-">destroy</a></span>(<a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a> instance)</code> |
| <div class="block"> |
| When called, the container destroys the instance if the active context object for the scope type of the bean supports |
| destroying bean instances.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#isAmbiguous--">isAmbiguous</a></span>()</code> |
| <div class="block"> |
| Determines if there is more than one bean that matches the required type and qualifiers and is eligible for injection |
| into the class into which the parent <tt>Instance</tt> was injected.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>default boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#isResolvable--">isResolvable</a></span>()</code> |
| <div class="block"> |
| Determines if there is exactly one bean that matches the required type and qualifiers and is eligible for injection |
| into the class into which the parent <tt>Instance</tt> was injected.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#isUnsatisfied--">isUnsatisfied</a></span>()</code> |
| <div class="block"> |
| Determines if there is no bean that matches the required type and qualifiers and is eligible for injection into the class |
| into which the parent <tt>Instance</tt> was injected.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject">Instance</a><<a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#select-java.lang.annotation.Annotation...-">select</a></span>(java.lang.annotation.Annotation... qualifiers)</code> |
| <div class="block"> |
| Obtains a child <tt>Instance</tt> for the given additional required qualifiers.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><U extends <a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>><br><a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject">Instance</a><U></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#select-java.lang.Class-java.lang.annotation.Annotation...-">select</a></span>(java.lang.Class<U> subtype, |
| java.lang.annotation.Annotation... qualifiers)</code> |
| <div class="block"> |
| Obtains a child <tt>Instance</tt> for the given required type and additional required qualifiers.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><U extends <a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>><br><a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject">Instance</a><U></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#select-javax.enterprise.util.TypeLiteral-java.lang.annotation.Annotation...-">select</a></span>(<a href="../../../javax/enterprise/util/TypeLiteral.html" title="class in javax.enterprise.util">TypeLiteral</a><U> subtype, |
| java.lang.annotation.Annotation... qualifiers)</code> |
| <div class="block"> |
| Obtains a child <tt>Instance</tt> for the given required type and additional required qualifiers.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>default java.util.stream.Stream<<a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/enterprise/inject/Instance.html#stream--">stream</a></span>()</code> |
| <div class="block"> |
| When called, provides back a Stream of the beans available in this Instance.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface java.lang.Iterable</h3> |
| <code>forEach, iterator, spliterator</code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.javax.inject.Provider"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface javax.inject.<a href="../../../javax/inject/Provider.html" title="interface in javax.inject">Provider</a></h3> |
| <code><a href="../../../javax/inject/Provider.html#get--">get</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="select-java.lang.annotation.Annotation...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>select</h4> |
| <pre><a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject">Instance</a><<a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>> select(java.lang.annotation.Annotation... qualifiers)</pre> |
| <div class="block"><p> |
| Obtains a child <tt>Instance</tt> for the given additional required qualifiers. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>qualifiers</code> - the additional required qualifiers</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the child <tt>Instance</tt></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if passed two instances of the same non repeating qualifier type, or an instance of an annotation that |
| is not a qualifier type</dd> |
| <dd><code>java.lang.IllegalStateException</code> - if the container is already shutdown</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="select-java.lang.Class-java.lang.annotation.Annotation...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>select</h4> |
| <pre><U extends <a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>> <a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject">Instance</a><U> select(java.lang.Class<U> subtype, |
| java.lang.annotation.Annotation... qualifiers)</pre> |
| <div class="block"><p> |
| Obtains a child <tt>Instance</tt> for the given required type and additional required qualifiers. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>U</code> - the required type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>subtype</code> - a <code>Class</code> representing the required type</dd> |
| <dd><code>qualifiers</code> - the additional required qualifiers</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the child <tt>Instance</tt></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if passed two instances of the same non repeating qualifier type, or an instance of an annotation that |
| is not a qualifier type</dd> |
| <dd><code>java.lang.IllegalStateException</code> - if the container is already shutdown</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="select-javax.enterprise.util.TypeLiteral-java.lang.annotation.Annotation...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>select</h4> |
| <pre><U extends <a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>> <a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject">Instance</a><U> select(<a href="../../../javax/enterprise/util/TypeLiteral.html" title="class in javax.enterprise.util">TypeLiteral</a><U> subtype, |
| java.lang.annotation.Annotation... qualifiers)</pre> |
| <div class="block"><p> |
| Obtains a child <tt>Instance</tt> for the given required type and additional required qualifiers. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>U</code> - the required type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>subtype</code> - a <a href="../../../javax/enterprise/util/TypeLiteral.html" title="class in javax.enterprise.util"><code>TypeLiteral</code></a> representing the required type</dd> |
| <dd><code>qualifiers</code> - the additional required qualifiers</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the child <tt>Instance</tt></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if passed two instances of the same non repeating qualifier type, or an instance of an annotation that |
| is not a qualifier type</dd> |
| <dd><code>java.lang.IllegalStateException</code> - if the container is already shutdown</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="stream--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stream</h4> |
| <pre>default java.util.stream.Stream<<a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a>> stream()</pre> |
| <div class="block"><p> |
| When called, provides back a Stream of the beans available in this Instance. If no beans are found, it returns an empty |
| stream. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <tt>Stream</tt> representing the beans associated with this <a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject"><code>Instance</code></a> object</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isUnsatisfied--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isUnsatisfied</h4> |
| <pre>boolean isUnsatisfied()</pre> |
| <div class="block"><p> |
| Determines if there is no bean that matches the required type and qualifiers and is eligible for injection into the class |
| into which the parent <tt>Instance</tt> was injected. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><tt>true</tt> if there is no bean that matches the required type and qualifiers and is eligible for injection |
| into the class into which the parent <tt>Instance</tt> was injected, or <tt>false</tt> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isAmbiguous--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isAmbiguous</h4> |
| <pre>boolean isAmbiguous()</pre> |
| <div class="block"><p> |
| Determines if there is more than one bean that matches the required type and qualifiers and is eligible for injection |
| into the class into which the parent <tt>Instance</tt> was injected. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><tt>true</tt> if there is more than one bean that matches the required type and qualifiers and is eligible for |
| injection into the class into which the parent <tt>Instance</tt> was injected, or <tt>false</tt> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isResolvable--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isResolvable</h4> |
| <pre>default boolean isResolvable()</pre> |
| <div class="block"><p> |
| Determines if there is exactly one bean that matches the required type and qualifiers and is eligible for injection |
| into the class into which the parent <tt>Instance</tt> was injected. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><tt>true</tt> if there is exactly one bean that matches the required type and qualifiers and is eligible for |
| injection into the class into which the parent <tt>Instance</tt> was injected, or <tt>false</tt> otherwise.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="destroy-java.lang.Object-"> |
| <!-- --> |
| </a><a name="destroy-T-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>destroy</h4> |
| <pre>void destroy(<a href="../../../javax/enterprise/inject/Instance.html" title="type parameter in Instance">T</a> instance)</pre> |
| <div class="block"><p> |
| When called, the container destroys the instance if the active context object for the scope type of the bean supports |
| destroying bean instances. All normal scoped built-in contexts support destroying bean instances. |
| </p> |
| |
| <p> |
| The instance passed should either be a dependent scoped bean instance obtained from the same <a href="../../../javax/enterprise/inject/Instance.html" title="interface in javax.enterprise.inject"><code>Instance</code></a> object, or |
| the client proxy for a normal scoped bean instance. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>instance</code> - the instance to destroy</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.UnsupportedOperationException</code> - if the active context object for the scope type of the bean does not support |
| destroying bean instances</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.1</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../index-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../javax/enterprise/inject/InjectionException.html" title="class in javax.enterprise.inject"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../javax/enterprise/inject/Intercepted.html" title="annotation in javax.enterprise.inject"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/enterprise/inject/Instance.html" target="_top">Frames</a></li> |
| <li><a href="Instance.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |