Enum InheritanceSelector.MODE

  • All Implemented Interfaces:
    Serializable, Comparable<InheritanceSelector.MODE>
    Enclosing class:
    InheritanceSelector<T>

    public static enum InheritanceSelector.MODE
    extends Enum<InheritanceSelector.MODE>
    This enumeration lists the various modes of inheritance that can be specified. The modes mean:
    ModeMeaning
    USE_FIRSTOnly the first definition is kept.
    MULTIPLEAllow multiple values if Jenkins expects iterable.
    USE_LASTOnly the last definition is kept.
    MERGE This will call InheritanceSelector.merge(Object, Object, InheritanceProject) to merge identical definitions and put them at the position of the last definition.
    NOT_RESPONSIBLE This mode signifies, that this InheritanceSelector is not responsible for the given class of Objects. If all registered selectors return this mode for a particular type, the default behaviour is presumed. This means "USE_LAST" in case the return value expected by Jenkins is not an iterable or "MULTIPLE" if it is an iterable.

    Do note that it is for obvious reasons not possible to apply two InheritanceSelectors that handle the same

    Author:
    Martin Schroeder
    • Method Detail

      • values

        public static InheritanceSelector.MODE[] 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 (InheritanceSelector.MODE c : InheritanceSelector.MODE.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static InheritanceSelector.MODE valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null