UninstallMode (install4j help)
Date: 2009-06-17

## install4j API documentation

## com.install4j.api.context
Class UninstallMode

    java.lang.Object
      com.install4j.api.context.UninstallMode

    public class UninstallMode

extends java.lang.Object

Enumeration class that represents the different ways how install4j can handle the uninstallation of a file.

Author:
  ej-technologies GmbH
See Also:
  `FileOptions`

Field Summary
`static UninstallMode` | `ALWAYS` Indicates that the uninstaller will always delete this file.
`static UninstallMode` | `ALWAYS_BUT_NOT_FOR_UPDATE` Indicates that the destination file won't be deleted when the uninstaller runs as part of an update.
`static UninstallMode` | `IF_CREATED` Indicates that if the destination file was created by the installer it will be deleted for uninstallation.
`static UninstallMode` | `IF_CREATED_BUT_NOT_FOR_UPDATE` Indicates that the destination file won't be deleted when the uninstaller runs as part of an update.
`static UninstallMode` | `NEVER` Indicates that the destination file won't be deleted for uninstallation.

Method Summary
`static UninstallMode` | `getFromIntValue(int uninstall)` Convert int value to constant.
`int` | `getIntValue()` Convert to an int value.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### IF_CREATED

    public static final UninstallMode IF_CREATED

  Indicates that if the destination file was created by the installer it will be deleted for uninstallation. This is the default setting.

### NEVER

    public static final UninstallMode NEVER

  Indicates that the destination file won't be deleted for uninstallation.

### ALWAYS

    public static final UninstallMode ALWAYS

  Indicates that the uninstaller will always delete this file. Handle with care.

### IF_CREATED_BUT_NOT_FOR_UPDATE

    public static final UninstallMode IF_CREATED_BUT_NOT_FOR_UPDATE

  Indicates that the destination file won't be deleted when the uninstaller runs as part of an update. Otherwise it behaves like `IF_CREATED`.

### ALWAYS_BUT_NOT_FOR_UPDATE

    public static final UninstallMode ALWAYS_BUT_NOT_FOR_UPDATE

  Indicates that the destination file won't be deleted when the uninstaller runs as part of an update. Otherwise it behaves like `ALWAYS`.

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getIntValue

    public int getIntValue()

  Convert to an int value.

  Returns:
    the int value

### getFromIntValue

    public static UninstallMode getFromIntValue(int uninstall)

  Convert int value to constant.

  Parameters:
    `uninstall` - the int value
  Returns:
    the constant