Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.xl.vmx
Interface Routine

All Known Implementing Classes:
  ComplexMethod, MethodExpression, RoutineBase

    public interface Routine

A `Routine` provides a VMXState with the information that is needed to construct a stack frame in which the routine can be executed. It is a callback interface and used in the methods `VMXState.invoke(Routine, int, Authorization)` and `VMXState.createDescriptor(Routine, int, Authorization)`.

Author:
  Ole Kniemeyer

Method Summary
`AbruptCompletion.Return` | `execute(VMXState s)` This callback method is invoked by the executing `VMXState`.
`int` | `getFrameSize()` Computes the number of VMXState stack elements for the frame of this routine.
`int` | `getJavaFrameSize()` Computes the number of VMXState stack elements for the Java frame of this routine.
`int` | `getParameterSize()` Computes the number of VMXState stack elements for the parameters of this routine.
`boolean` | `hasJavaParameters()` Determines whether this routine expects its parameters on the Java frame or the normal frame.

Method Detail

### execute

    AbruptCompletion.Return execute(VMXState s)

  This callback method is invoked by the executing `VMXState`. A return value has to be wrapped in an instance of `AbruptCompletion.Return`.

  Parameters:
    `s` - the executing VMXState
  Returns:
    the wrapped return value

### getFrameSize

    int getFrameSize()

  Computes the number of VMXState stack elements for the frame of this routine. This includes the parameters, if any.

  Returns:
    the size of the frame in terms of stack elements

### getJavaFrameSize

    int getJavaFrameSize()

  Computes the number of VMXState stack elements for the Java frame of this routine. This includes the parameters, if any.

  Returns:
    the size of the Java frame in terms of stack elements

### getParameterSize

    int getParameterSize()

  Computes the number of VMXState stack elements for the parameters of this routine.

  Returns:
    the number of stack elements for parameters

### hasJavaParameters

    boolean hasJavaParameters()

  Determines whether this routine expects its parameters on the Java frame or the normal frame.

  Returns:
    `true` iff parameters are expected on the Java frame

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD