Enum Restore

  • All Implemented Interfaces:
    Serializable, Comparable<Restore>

    public enum Restore
    extends Enum<Restore>
    The type of accessing properties: by field or by setter. If default is chosen, the property access type is defined in the Unitils configuration file.
    Author:
    Filip Neven, Tim Ducheyne
    • Enum Constant Detail

      • DEFAULT

        public static final Restore DEFAULT
        OLD_VALUE, NO_RESTORE or NULL_VALUE as defined by the default value in the configuration.
      • OLD_VALUE

        public static final Restore OLD_VALUE
        Reset the injected field back to its original value
      • NO_RESTORE

        public static final Restore NO_RESTORE
        Leave the injected field
      • NULL_OR_0_VALUE

        public static final Restore NULL_OR_0_VALUE
        Set the injected field to the null or 0 value
    • Method Detail

      • values

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

        public static Restore 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