Package org.junit.jupiter.api.extension
Class ExtensionContext.Namespace
- java.lang.Object
-
- org.junit.jupiter.api.extension.ExtensionContext.Namespace
-
- Enclosing interface:
- ExtensionContext
public static class ExtensionContext.Namespace extends Object
ANamespace
is used to provide a scope for data saved by extensions within aExtensionContext.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.
-
-
Field Summary
Fields Modifier and Type Field Description static ExtensionContext.Namespace
GLOBAL
The default, global namespace which allows access to stored data from all extensions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtensionContext.Namespace
create(Object... parts)
Create a namespace which restricts access to data to all extensions which use the same sequence ofparts
for creating a namespace.boolean
equals(Object o)
int
hashCode()
-
-
-
Field Detail
-
GLOBAL
public static final ExtensionContext.Namespace GLOBAL
The default, global namespace which allows access to stored data from all extensions.
-
-
Method Detail
-
create
public static ExtensionContext.Namespace create(Object... parts)
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)
.
-
-