Class NamespaceAwareStore

java.lang.Object
org.junit.jupiter.engine.execution.NamespaceAwareStore
All Implemented Interfaces:
org.junit.jupiter.api.extension.ExtensionContext.Store

@API(status=INTERNAL, since="5.0") public class NamespaceAwareStore extends Object implements org.junit.jupiter.api.extension.ExtensionContext.Store
Since:
5.0
  • Field Details

    • valuesStore

      private final NamespacedHierarchicalStore<org.junit.jupiter.api.extension.ExtensionContext.Namespace> valuesStore
    • namespace

      private final org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace
  • Constructor Details

    • NamespaceAwareStore

      public NamespaceAwareStore(NamespacedHierarchicalStore<org.junit.jupiter.api.extension.ExtensionContext.Namespace> valuesStore, org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace)
  • Method Details

    • get

      public Object get(Object key)
      Specified by:
      get in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • get

      public <T> T get(Object key, Class<T> requiredType)
      Specified by:
      get in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • getOrComputeIfAbsent

      public <K, V> Object getOrComputeIfAbsent(K key, Function<K,V> defaultCreator)
      Specified by:
      getOrComputeIfAbsent in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • getOrComputeIfAbsent

      public <K, V> V getOrComputeIfAbsent(K key, Function<K,V> defaultCreator, Class<V> requiredType)
      Specified by:
      getOrComputeIfAbsent in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • put

      public void put(Object key, Object value)
      Specified by:
      put in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • remove

      public Object remove(Object key)
      Specified by:
      remove in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • remove

      public <T> T remove(Object key, Class<T> requiredType)
      Specified by:
      remove in interface org.junit.jupiter.api.extension.ExtensionContext.Store
    • accessStore

      private <T> T accessStore(Supplier<T> action)