com.oracle.truffle.api.frame

## Interface Frame

All Known Subinterfaces:
  MaterializedFrame, VirtualFrame

    public interface Frame

Represents a frame containing values of local variables of the guest language. Instances of this type must not be stored in a field or cast to `Object`.

### Method Summary

Methods
`java.lang.Object[]` `getArguments()` Retrieves the arguments object from this frame.
`boolean` `getBoolean(FrameSlot slot)` Read access to a local variable of type boolean.
`byte` `getByte(FrameSlot slot)` Read access to a local variable of type byte.
`double` `getDouble(FrameSlot slot)` Read access to a local variable of type double.
`float` `getFloat(FrameSlot slot)` Read access to a local variable of type float.
`FrameDescriptor` `getFrameDescriptor()`
`int` `getInt(FrameSlot slot)` Read access to a local variable of type int.
`long` `getLong(FrameSlot slot)` Read access to a local variable of type long.
`java.lang.Object` `getObject(FrameSlot slot)` Read access to a local variable of type `Object`.
`java.lang.Object` `getValue(FrameSlot slot)` Read access to a local variable of any type.
`boolean` `isBoolean(FrameSlot slot)` Check whether the given `FrameSlot` is of type boolean.
`boolean` `isByte(FrameSlot slot)` Check whether the given `FrameSlot` is of type byte.
`boolean` `isDouble(FrameSlot slot)` Check whether the given `FrameSlot` is of type double.
`boolean` `isFloat(FrameSlot slot)` Check whether the given `FrameSlot` is of type float.
`boolean` `isInt(FrameSlot slot)` Check whether the given `FrameSlot` is of type int.
`boolean` `isLong(FrameSlot slot)` Check whether the given `FrameSlot` is of type long.
`boolean` `isObject(FrameSlot slot)` Check whether the given `FrameSlot` is of type object.
`MaterializedFrame` `materialize()` Materializes this frame, which allows it to be stored in a field or cast to `Object`.
`void` `setBoolean(FrameSlot slot, boolean value)` Write access to a local variable of type boolean.
`void` `setByte(FrameSlot slot, byte value)` Write access to a local variable of type byte.
`void` `setDouble(FrameSlot slot, double value)` Write access to a local variable of type double.
`void` `setFloat(FrameSlot slot, float value)` Write access to a local variable of type float.
`void` `setInt(FrameSlot slot, int value)` Write access to a local variable of type int.
`void` `setLong(FrameSlot slot, long value)` Write access to a local variable of type long.
`void` `setObject(FrameSlot slot, java.lang.Object value)` Write access to a local variable of type `Object`.

### Method Detail

#### getFrameDescriptor

    FrameDescriptor getFrameDescriptor()

Returns:
  the object describing the layout of this frame

#### getArguments

    java.lang.Object[] getArguments()

Retrieves the arguments object from this frame. The runtime assumes that the arguments object is never null.

Returns:
  the arguments used when calling this method

#### getObject

    java.lang.Object getObject(FrameSlot slot)
                               throws FrameSlotTypeException

Read access to a local variable of type `Object`.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setObject

    void setObject(FrameSlot slot,
                 java.lang.Object value)

Write access to a local variable of type `Object`.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getByte

    byte getByte(FrameSlot slot)
                 throws FrameSlotTypeException

Read access to a local variable of type byte.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setByte

    void setByte(FrameSlot slot,
               byte value)

Write access to a local variable of type byte.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getBoolean

    boolean getBoolean(FrameSlot slot)
                       throws FrameSlotTypeException

Read access to a local variable of type boolean.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setBoolean

    void setBoolean(FrameSlot slot,
                  boolean value)

Write access to a local variable of type boolean.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getInt

    int getInt(FrameSlot slot)
               throws FrameSlotTypeException

Read access to a local variable of type int.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setInt

    void setInt(FrameSlot slot,
              int value)

Write access to a local variable of type int.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getLong

    long getLong(FrameSlot slot)
                 throws FrameSlotTypeException

Read access to a local variable of type long.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setLong

    void setLong(FrameSlot slot,
               long value)

Write access to a local variable of type long.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getFloat

    float getFloat(FrameSlot slot)
                   throws FrameSlotTypeException

Read access to a local variable of type float.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setFloat

    void setFloat(FrameSlot slot,
                float value)

Write access to a local variable of type float.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getDouble

    double getDouble(FrameSlot slot)
                     throws FrameSlotTypeException

Read access to a local variable of type double.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable
Throws:
  `FrameSlotTypeException`

#### setDouble

    void setDouble(FrameSlot slot,
                 double value)

Write access to a local variable of type double.

Parameters:
  `slot` - the slot of the local variable
  `value` - the new value of the local variable

#### getValue

    java.lang.Object getValue(FrameSlot slot)

Read access to a local variable of any type.

Parameters:
  `slot` - the slot of the local variable
Returns:
  the current value of the local variable or defaultValue if unset

#### materialize

    MaterializedFrame materialize()

Materializes this frame, which allows it to be stored in a field or cast to `Object`. The frame however looses the ability to be packed or to access the caller frame.

Returns:
  the new materialized frame

#### isObject

    boolean isObject(FrameSlot slot)

Check whether the given `FrameSlot` is of type object.

#### isByte

    boolean isByte(FrameSlot slot)

Check whether the given `FrameSlot` is of type byte.

#### isBoolean

    boolean isBoolean(FrameSlot slot)

Check whether the given `FrameSlot` is of type boolean.

#### isInt

    boolean isInt(FrameSlot slot)

Check whether the given `FrameSlot` is of type int.

#### isLong

    boolean isLong(FrameSlot slot)

Check whether the given `FrameSlot` is of type long.

#### isFloat

    boolean isFloat(FrameSlot slot)

Check whether the given `FrameSlot` is of type float.

#### isDouble

    boolean isDouble(FrameSlot slot)

Check whether the given `FrameSlot` is of type double.