Class Namespace
- java.lang.Object
-
- org.junit.platform.engine.support.store.Namespace
-
@API(status=MAINTAINED, since="1.13.3") public class Namespace extends java.lang.ObjectANamespaceis used to provide a scope for data saved by extensions within aNamespacedHierarchicalStore.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.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNamespace(java.util.List<java.lang.Object> parts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Namespaceappend(java.lang.Object... parts)Create a new namespace by appending the suppliedpartsto the existing sequence of parts in this namespace.static 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.static Namespacecreate(java.util.List<java.lang.Object> objects)Create a namespace which restricts access to data to all extensions which use the same sequence ofobjectsfor creating a namespace.booleanequals(java.lang.Object o)inthashCode()
-
-
-
Field Detail
-
GLOBAL
public static final Namespace GLOBAL
The default, global namespace which allows access to stored data from all extensions.
-
parts
private final java.util.List<java.lang.Object> parts
-
-
Method Detail
-
create
public static Namespace create(java.lang.Object... parts)
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).
-
create
public static Namespace create(java.util.List<java.lang.Object> objects)
Create a namespace which restricts access to data to all extensions which use the same sequence ofobjectsfor creating a namespace.The order of the
objectsis significant.Internally the
objectsare 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
-
append
public Namespace append(java.lang.Object... parts)
Create a new namespace by appending the suppliedpartsto the existing sequence of parts in this namespace.- Returns:
- new namespace; never
null
-
-