Enum 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>
    ResourceLockTarget is used to define the target of a shared resource.
    Since:
    5.12
    See Also:
    ResourceLock.target()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CHILDREN
      Add a shared resource to the direct children of the current node.
      SELF
      Add a shared resource to the current node.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ResourceLockTarget valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 CHILDREN for 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 name
        java.lang.NullPointerException - if the argument is null