T - the required bean typepublic static interface Instance.Handle<T>
extends java.lang.AutoCloseable
Allows to inspect the metadata of the relevant bean before resolving its contextual reference and also to destroy the underlying contextual instance.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Delegates to
destroy(). |
void |
destroy()
Destroy the contextual instance.
|
T |
get()
The contextual reference is obtained lazily, i.e.
|
Bean<T> |
getBean() |
T get()
java.lang.IllegalStateException - If the producing Instance does not existjava.lang.IllegalStateException - If invoked on Instance.Handle that previously successfully destroyed its
underlying contextual referenceProvider.get()void destroy()
Instance.destroy(Object)void close()
destroy().close in interface java.lang.AutoCloseable