Class ExtensionValuesStore
- java.lang.Object
-
- ru.vyarus.spock.jupiter.engine.store.ExtensionValuesStore
-
public class ExtensionValuesStore extends java.lang.ObjectUsed inside implementations ofExtensionContextto store and retrieve values.Copy of
org.junit.jupiter.engine.execution.ExtensionValuesStorefrom junit-jupiter-engine (because exactly the same behaviour is required).- Since:
- 20.12.2021
-
-
Constructor Summary
Constructors Constructor Description ExtensionValuesStore(ExtensionValuesStore parentStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseAllStoredCloseableValues()Close all values that implementExtensionContext.Store.CloseableResource.protected java.lang.Objectget(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key)protected <T> Tget(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key, java.lang.Class<T> requiredType)protected <K,V>
java.lang.ObjectgetOrComputeIfAbsent(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, K key, java.util.function.Function<K,V> defaultCreator)protected <K,V>
VgetOrComputeIfAbsent(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, K key, java.util.function.Function<K,V> defaultCreator, java.lang.Class<V> requiredType)protected voidput(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key, java.lang.Object value)protected java.lang.Objectremove(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key)protected <T> Tremove(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key, java.lang.Class<T> requiredType)
-
-
-
Constructor Detail
-
ExtensionValuesStore
public ExtensionValuesStore(ExtensionValuesStore parentStore)
-
-
Method Detail
-
closeAllStoredCloseableValues
public void closeAllStoredCloseableValues()
Close all values that implementExtensionContext.Store.CloseableResource.Note: Only close values stored in this instance. This implementation does not close values in parent stores.
-
get
protected java.lang.Object get(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key)
-
get
protected <T> T get(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key, java.lang.Class<T> requiredType)
-
getOrComputeIfAbsent
protected <K,V> java.lang.Object getOrComputeIfAbsent(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, K key, java.util.function.Function<K,V> defaultCreator)
-
getOrComputeIfAbsent
protected <K,V> V getOrComputeIfAbsent(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, K key, java.util.function.Function<K,V> defaultCreator, java.lang.Class<V> requiredType)
-
put
protected void put(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key, java.lang.Object value)
-
remove
protected java.lang.Object remove(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key)
-
remove
protected <T> T remove(org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace, java.lang.Object key, java.lang.Class<T> requiredType)
-
-