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 Details

    • getFrameDescriptor

      FrameDescriptor getFrameDescriptor()
      Returns:
      the object describing the layout of this frame
    • getArguments

      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

      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, 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

      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.