public class ForeignDescriptorImpl extends Object implements ForeignDescriptor
This is useful in the case of caching where an algorithm is able to store and subsequently provide for an injection the already resolved descriptor of the same value.
| Constructor and Description |
|---|
ForeignDescriptorImpl(Object foreignDescriptor)
Constructor accepts a descriptor of the DI provider and to be able to provide it in further processing.
|
ForeignDescriptorImpl(Object foreignDescriptor,
Consumer<Object> disposeInstance)
Constructor accepts a descriptor of the DI provider and to be able to provide it in further processing along with
dispose mechanism to destroy the objects corresponding the given
foreign key. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(Object instance)
Disposes this instance.
|
boolean |
equals(Object o) |
Object |
get()
Returns an object that can be cast on the side of DI provider to his descriptor.
|
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitwrap, wrappublic ForeignDescriptorImpl(Object foreignDescriptor)
foreignDescriptor - DI provider's descriptor.public ForeignDescriptorImpl(Object foreignDescriptor, Consumer<Object> disposeInstance)
foreign key.foreignDescriptor - DI provider's descriptor.public Object get()
ForeignDescriptorget in interface ForeignDescriptorpublic void dispose(Object instance)
ForeignDescriptordispose in interface ForeignDescriptorinstance - The instance to destroy.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.