public final class MemoizingValueAccess extends java.lang.Object implements InjectedValueAccess
EMPTY
Modifier and Type | Method and Description |
---|---|
<T> java.util.Optional<T> |
injectedValue(Key<T> key,
InjectedValueAccess context)
Get an injected value, resolving other injected values under the given context.
|
InjectedValueAccess |
snapshotMemory()
Snapshot the current memory for reading.
|
static MemoizingValueAccess |
wrap(InjectedValueAccess delegate) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
injectedValue
public static MemoizingValueAccess wrap(InjectedValueAccess delegate)
public InjectedValueAccess snapshotMemory()
public <T> java.util.Optional<T> injectedValue(Key<T> key, InjectedValueAccess context)
InjectedValueAccess
Provide value injectors to a store.
This alternative to InjectedValueAccess.injectedValue(Key)
is provided mostly for
wrapping classes to function properly.
injectedValue
in interface InjectedValueAccess
Optional.empty()
if not providedInjectedValueStore.injectValue(Key, ValueProvider)