Package org.junit.jupiter.api.parallel
Enum ResourceLockTarget
- java.lang.Object
-
- java.lang.Enum<ResourceLockTarget>
-
- org.junit.jupiter.api.parallel.ResourceLockTarget
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ResourceLockTarget>
@API(status=MAINTAINED, since="5.13.3") public enum ResourceLockTarget extends java.lang.Enum<ResourceLockTarget>ResourceLockTargetis used to define the target of a shared resource.- Since:
- 5.12
- See Also:
ResourceLock.target()
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceLockTargetvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ResourceLockTarget[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SELF
public static final ResourceLockTarget SELF
Add a shared resource to the current node.
-
CHILDREN
public static final ResourceLockTarget CHILDREN
Add a shared resource to the direct children of the current node.Examples of "parent - child" relationships in the context of
ResourceLockTarget:- test class: test methods and nested test classes declared in the test class are children of the test class.
- nested test class: test methods and nested test classes declared in the nested class are children of the nested test class.
- test method: test methods are not considered to have
children. Using
CHILDRENfor a test method results in an exception.
-
-
Method Detail
-
values
public static ResourceLockTarget[] 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 (ResourceLockTarget c : ResourceLockTarget.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResourceLockTarget 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 namejava.lang.NullPointerException- if the argument is null
-
-