Class NamespaceAwareStore

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.ExtensionContext.Store

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

      • Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.ExtensionContext.Store

        org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace  
      private NamespacedHierarchicalStore<org.junit.jupiter.api.extension.ExtensionContext.Namespace> valuesStore  
    • Constructor Summary

      Constructors 
      Constructor Description
      NamespaceAwareStore​(NamespacedHierarchicalStore<org.junit.jupiter.api.extension.ExtensionContext.Namespace> valuesStore, org.junit.jupiter.api.extension.ExtensionContext.Namespace namespace)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private <T> T accessStore​(java.util.function.Supplier<T> action)  
      java.lang.Object get​(java.lang.Object key)  
      <T> T get​(java.lang.Object key, java.lang.Class<T> requiredType)  
      <K,​V>
      java.lang.Object
      getOrComputeIfAbsent​(K key, java.util.function.Function<K,​V> defaultCreator)  
      <K,​V>
      V
      getOrComputeIfAbsent​(K key, java.util.function.Function<K,​V> defaultCreator, java.lang.Class<V> requiredType)  
      void put​(java.lang.Object key, java.lang.Object value)  
      java.lang.Object remove​(java.lang.Object key)  
      <T> T remove​(java.lang.Object key, java.lang.Class<T> requiredType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.junit.jupiter.api.extension.ExtensionContext.Store

        getOrComputeIfAbsent, getOrDefault
    • Field Detail

      • namespace

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

      • NamespaceAwareStore

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

      • get

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

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

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

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

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

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

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

        private <T> T accessStore​(java.util.function.Supplier<T> action)