T - public abstract class ReferencingFactory<T>
extends java.lang.Object
implements org.glassfish.hk2.api.Factory<T>
| Modifier and Type | Class and Description |
|---|---|
private static class |
ReferencingFactory.EmptyReferenceFactory<T> |
private static class |
ReferencingFactory.InitializedReferenceFactory<T> |
| Modifier and Type | Field and Description |
|---|---|
private javax.inject.Provider<Ref<T>> |
referenceFactory |
| Constructor and Description |
|---|
ReferencingFactory(javax.inject.Provider<Ref<T>> referenceFactory)
Create new referencing injection factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(T instance) |
T |
provide() |
static <T> org.glassfish.hk2.api.Factory<Ref<T>> |
referenceFactory()
Get a reference factory providing an empty reference.
|
static <T> org.glassfish.hk2.api.Factory<Ref<T>> |
referenceFactory(T initialValue)
Get a reference factory providing an initialized reference.
|
public void dispose(T instance)
dispose in interface org.glassfish.hk2.api.Factory<T>public static <T> org.glassfish.hk2.api.Factory<Ref<T>> referenceFactory()
T - reference type.public static <T> org.glassfish.hk2.api.Factory<Ref<T>> referenceFactory(T initialValue)
T - reference type.initialValue - initial value stored in the reference provided
by the returned factory.initialValue.