# Interface: com.pnfsoftware.jeb.core.units.code.android.ir.IDEmuFrame

An emulator frame, used by `dexdec` State objects. A frame of method execution holds the PC, variable values, the raised exception exception \(if any\). Frames are stacked: each sub\-routine call creates another frame in the stack. A frame is part of an emulation [context](IDEmuContext).

## Method: copy
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDEmuFrame`

Description: Perform a deep copy of this frame.
return: the copied frame

## Method: deleteVariable
- parameter: `id`, type: `int`
- return type: `boolean`

Description: Remove \(unset\) a variable.
parameter: id: variable id
return: true if the variable existed and was deleted
throws: if the variable cannot be deleted

## Method: deleteVariables

Description: Remove \(unset\) all variables.

## Method: getIterationCount
- return type: `int`

Description: Retrieve the current iteration count in the frame.
return: the current iteration count

## Method: getMethodSignature
- return type: `java.lang.String`

Description: Retrieve the method signature for this frame.
return: the method signature

## Method: getNextPC
- return type: `java.lang.Integer`

Description: Retrieve the optional next PC, if one was set. The next PC is set when evaluating an instruction via `IDInstruction#evaluate`. The PC can be updated with the next PC with [#updatePC()](#updatePC()).
return: the next program counter, or null if none is set

## Method: getPC
- return type: `int`

Description: Retrieve the current PC.
return: the current program counter

## Method: getRaisedException
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDImm`

Description: Retrieve the emulated exception raised by the emulation of this method.
return: the raised exception reference, or null if none was raised

## Method: getVarMap
- return type: `java.util.Map<java.lang.Integer,com.pnfsoftware.jeb.core.units.code.android.ir.IDImm>`

Description: Reserved for internal use.
return: a full\-access map of variables

## Method: getVariable
- parameter: `id`, type: `int`
- parameter: `readNullIfUnset`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDImm`

Description: Read a variable.
parameter: id: variable id
parameter: readNullIfUnset: fail\-safe to avoid throwing if the variable is unset
return: a value, null if the variable is unset and \`readNullIfUnset\` is true
throws: if the variable is unset and \`readNullIfUnset\` is false

## Method: getVariable
- parameter: `id`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDImm`

Description: Read a variable. The variable must exist.
parameter: id: variable id
return: non\-null value
throws: if the variable is unset

## Method: hasVariable
- parameter: `id`, type: `int`
- return type: `boolean`

Description: Determine whether a variable is set \(has a value\).
parameter: id: variable id
return: true if the variable is set
throws: if the variable state cannot be queried

## Method: isExecutionComplete
- return type: `boolean`

Description: Determine whether the emulation of the method is complete. If an [exception is raised](#getRaisedException()), the emulation is not considered complete.
return: true if the method has "returned"

## Method: setExecutionComplete
- parameter: `done`, type: `boolean`

Description: This method is used by the emulator to specify that the emulation of the method is complete. If an [exception is raised](#getRaisedException()), the emulation is not considered complete.
parameter: done: true if the method has "returned"

## Method: setPC
- parameter: `PC`, type: `int`

Description: Set the current PC.
parameter: PC: program counter value

## Method: setRaisedException
- parameter: `ex`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDImm`

Description: This method is used by the emulator to specify that the emulation of the method raised an exception.
parameter: ex: an emulated exception

## Method: setVarMap
- parameter: `varmap`, type: `java.util.Map<java.lang.Integer,com.pnfsoftware.jeb.core.units.code.android.ir.IDImm>`

Description: Reserved for internal use.
parameter: varmap: a map of variables

## Method: setVariable
- parameter: `id`, type: `int`
- parameter: `val`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.IDImm`

Description: Write a variable.
parameter: id: variable id
parameter: val: non\-null value
throws: if the variable cannot be written

## Method: updatePC
- return type: `int`

Description: Update the current PC with the [next PC](#getNextPC()) and return it.
return: the now current PC \(was the next PC\)

