Class ExtensionContext.Namespace
java.lang.Object
org.junit.jupiter.api.extension.ExtensionContext.Namespace
- Enclosing interface:
ExtensionContext
A
Namespace
is used to provide a scope for data saved by
extensions within a ExtensionContext.Store
.
Storing data in custom namespaces allows extensions to avoid accidentally mixing data between extensions or across different invocations within the lifecycle of a single extension.
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExtensionContext.Namespace
The default, global namespace which allows access to stored data from all extensions. -
Method Summary
Modifier and TypeMethodDescriptionCreate a new namespace by appending the suppliedparts
to the existing sequence of parts in this namespace.static ExtensionContext.Namespace
Create a namespace which restricts access to data to all extensions which use the same sequence ofparts
for creating a namespace.boolean
getParts()
int
hashCode()
-
Field Details
-
GLOBAL
The default, global namespace which allows access to stored data from all extensions.
-
-
Method Details
-
create
Create a namespace which restricts access to data to all extensions which use the same sequence ofparts
for creating a namespace.The order of the
parts
is significant.Internally the
parts
are compared usingObject.equals(Object)
. -
equals
-
hashCode
-
append
-
getParts
-