ReplacementMode (install4j API)
Description: declaration: package: com.install4j.api.beans, enum: ReplacementMode

# Enum Class ReplacementMode

java.lang.Object
java.lang.Enum<ReplacementMode>
com.install4j.api.beans.ReplacementMode

All Implemented Interfaces:
  `Serializable, Comparable<ReplacementMode>, Constable`

public enum ReplacementMode extends Enum<ReplacementMode>
Variable replacement mode for string properties that are used in regular expressions. This enum is used as a parameter to `AbstractBean.replaceVariables(String, ReplacementMode)`.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `I18N_ONLY`
  Only i18n variables like `${i18n:myKey}` will be replaced.
  `PLAIN`
  Normal replacement like in `AbstractBean.replaceVariables(String)`.
  `PROPERTIES_FILE`
  The property is used while replacing text directly in a Java properties file.
  `REGEXP_MATCH`
  The property is used as a regular expression.
  `REGEXP_REPLACEMENT`
  The property is used as a replacement part of a regular expression.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ReplacementMode`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ReplacementMode[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### PLAIN

    public static final ReplacementMode PLAIN
    Normal replacement like in `AbstractBean.replaceVariables(String)`.

  - ### I18N_ONLY

    public static final ReplacementMode I18N_ONLY
    Only i18n variables like `${i18n:myKey}` will be replaced.

  - ### REGEXP_MATCH

    public static final ReplacementMode REGEXP_MATCH
    The property is used as a regular expression. All special characters are quoted.

  - ### REGEXP_REPLACEMENT

    public static final ReplacementMode REGEXP_REPLACEMENT
    The property is used as a replacement part of a regular expression. Backslashes and dollar signs are quoted.

  - ### PROPERTIES_FILE

    public static final ReplacementMode PROPERTIES_FILE
    The property is used while replacing text directly in a Java properties file. See the Javadoc for java.util.Properties for more information on the encoding of a Java properties file.

- ## Method Details

  - ### values

    public static ReplacementMode[] 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 ReplacementMode 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