Enum ExtensionContext.StoreScope

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      EXECUTION_REQUEST
      The store is scoped to the current ExecutionRequest of the JUnit Platform Launcher.
      EXTENSION_CONTEXT
      The store is scoped to the current ExtensionContext.
      LAUNCHER_SESSION
      The store is scoped to the current LauncherSession.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ExtensionContext.StoreScope valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ExtensionContext.StoreScope[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • LAUNCHER_SESSION

        public static final ExtensionContext.StoreScope LAUNCHER_SESSION
        The store is scoped to the current LauncherSession.

        Any data that is stored in a Store with this scope will be available throughout the entire launcher session. Therefore, it may be used to inject values from registered LauncherSessionListener implementations, to share data across multiple executions of the Jupiter engine within the same session, or even to share data across multiple engines.

        See Also:
        org.junit.platform.launcher.LauncherSession#getStore(), org.junit.platform.launcher.LauncherSessionListener
      • EXECUTION_REQUEST

        public static final ExtensionContext.StoreScope EXECUTION_REQUEST
        The store is scoped to the current ExecutionRequest of the JUnit Platform Launcher.

        Any data that is stored in a Store with this scope will be available for the duration of the current execution request. Therefore, it may be used to share data across multiple engines.

        See Also:
        org.junit.platform.engine.ExecutionRequest#getStore()
      • EXTENSION_CONTEXT

        public static final ExtensionContext.StoreScope EXTENSION_CONTEXT
        The store is scoped to the current ExtensionContext.

        Any data that is stored in a Store with this scope will be bound to the current extension context lifecycle.

    • Method Detail

      • values

        public static ExtensionContext.StoreScope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ExtensionContext.StoreScope c : ExtensionContext.StoreScope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ExtensionContext.StoreScope valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null