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 java.lang.Object
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.
-
Field Summary
Fields Modifier and Type Field Description static ExtensionContext.NamespaceGLOBALThe default, global namespace which allows access to stored data from all extensions. -
Method Summary
Modifier and Type Method Description static ExtensionContext.Namespacecreate(java.lang.Object... parts)Create a namespace which restricts access to data to all extensions which use the same sequence ofpartsfor creating a namespace.booleanequals(java.lang.Object o)inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
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 ofpartsfor creating a namespace.The order of the
partsis significant.Internally the
partsare compared usingObject.equals(Object). -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-