Enum Class OverwriteMode

java.lang.Object
java.lang.Enum<OverwriteMode>
com.install4j.api.context.OverwriteMode
All Implemented Interfaces:
Serializable, Comparable<OverwriteMode>, Constable

public enum OverwriteMode extends Enum<OverwriteMode>
Enumeration class that represents the different ways how install4j can react if asked to install a file over an already existing file.
See Also:
  • Enum Constant Details

    • NEVER

      public static final OverwriteMode NEVER
      Indicates that if the destination file exists it won't be replaced in any case.
    • ALWAYS

      public static final OverwriteMode ALWAYS
      Indicates that if the destination file exists it will be replaced in any case.
    • IF_NEWER

      public static final OverwriteMode IF_NEWER
      Indicates that if the destination file exists it will be replaced if the source file is newer. On Windows, the file version resource will be used for the comparison. If the destination file is newer, it will be skipped silently.
    • IF_NEWER_OTHERWISE_ASK

      public static final OverwriteMode IF_NEWER_OTHERWISE_ASK
      Indicates that if the destination file exists it will be replaced if the source file is newer. On Windows the file version resource will be used for the comparison. If the destination file is newer, the framework will ask the user if the file should be replaced.
    • ALWAYS_ASK_EXCEPT_FOR_UPDATE

      public static final OverwriteMode ALWAYS_ASK_EXCEPT_FOR_UPDATE
      Indicates that if the destination file exists and has not been installed by a previous run of the installer the user will be asked whether to replace the file. Please note that if the user chooses "Never" or "Always", the framework won't ask the user again.
    • ALWAYS_ASK

      public static final OverwriteMode ALWAYS_ASK
      Indicates that the user will be asked whether to replace the file even if it was installed by a previous run of the installer. Please note that if the user chooses "Never" or "Always", the framework won't ask the user again.
  • Method Details

    • values

      public static OverwriteMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OverwriteMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFromIntValue

      public static OverwriteMode getFromIntValue(int overwrite)
      Convert int value to constant.
      Parameters:
      overwrite - the int value
      Returns:
      the constant
    • getIntValue

      public int getIntValue()
      Convert to an int value.
      Returns:
      the int value
    • toString

      public String toString()
      Overrides:
      toString in class Enum<OverwriteMode>