# InstallerVariableEvent

Import: `import com.install4j.api.events.InstallerVariableEvent;`

```java
public class InstallerVariableEvent extends InstallerEvent
```

The event object that is passed to installer event listeners for the variable change event type.
Event listeners are registered in the [`InstallerContext`](../context/InstallerContext.md).

This event object contains additional information about the changed variable.
The event type  and [`EventType.VARIABLE_CHANGED`](EventType.md#variable-changed)
produces this event object when fired.


**See also:**

- [InstallerEventListener](InstallerEventListener.md)
- [InstallerContext.addInstallerEventListener](../context/InstallerContext.md#addinstallereventlistener-installereventlistener)

## Inherited from

- [InstallerEvent](InstallerEvent.md) — 6 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getVariableName()`](#getvariablename) | `String` | Get the name of the variable that was changed. |
| [`toString()`](#tostring) | `String` |  |
| [`getVerbose()`](#getverbose) | `String` |  |

### getVariableName()

```java
public String getVariableName()
```

Get the name of the variable that was changed.


**Returns:** the name of the variable

### toString()

```java
public String toString()
```

### getVerbose()

```java
public String getVerbose()
```

## Constructors

| Signature | Description |
|---|---|
| [`InstallerVariableEvent(Object, Context, String)`](#installervariableevent-object-context-string) | The constructor is called by the framework. |

### InstallerVariableEvent(Object, Context, String)

```java
public InstallerVariableEvent(Object source, Context context, String variableName)
```

The constructor is called by the framework.


**Parameters:**

- `source` — the event source
- `context` — the context
- `variableName` — the name of the changed variable

