# ReplacementMode

Import: `import com.install4j.api.beans.ReplacementMode;`

```java
public final enum ReplacementMode
```

Variable replacement mode for string properties that are used in regular expressions.
This enum is used as a parameter to [`AbstractBean.replaceVariables`](AbstractBean.md#replacevariables-string-replacementmode).

## Constants

### PLAIN

Normal replacement like in [`AbstractBean.replaceVariables`](AbstractBean.md#replacevariables-string).

### I18N_ONLY

Only i18n variables like `${i18n:myKey}` will be replaced.

### REGEXP_MATCH

The property is used as a regular expression. All special characters are quoted.

### REGEXP_REPLACEMENT

The property is used as a replacement part of a regular expression. Backslashes and dollar signs are quoted.

### 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.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`values()`](#values) | `ReplacementMode[]` |  |
| [`valueOf(String)`](#valueof-string) | `ReplacementMode` |  |

### values()

```java
public static ReplacementMode[] values()
```

### valueOf(String)

```java
public static ReplacementMode valueOf(String name)
```

