Package com.install4j.api.context
Enum Class OverwriteMode
- All Implemented Interfaces:
Serializable
,Comparable<OverwriteMode>
,Constable
Enumeration class that represents the different ways how install4j can react if asked to install a file over an already existing
file.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that if the destination file exists, it will be replaced in any case.Indicates that the user will be asked whether to replace the file even if it was installed by a previous run of the installer.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.Indicates that if the destination file exists, it will be replaced if the source file is newer.Indicates that if the destination file exists, it will be replaced if the source file is newer.Indicates that if the destination file exists, it won't be replaced in any case. -
Method Summary
Modifier and TypeMethodDescriptionstatic OverwriteMode
getFromIntValue
(int overwrite) Convert int value to constant.int
Convert to an int value.toString()
static OverwriteMode
Returns the enum constant of this class with the specified name.static OverwriteMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEVER
Indicates that if the destination file exists, it won't be replaced in any case. -
ALWAYS
Indicates that if the destination file exists, it will be replaced in any case. -
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
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
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
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
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
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 nameNullPointerException
- if the argument is null
-
getFromIntValue
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
- Overrides:
toString
in classEnum<OverwriteMode>
-