de.grogra.xl.vmx
Class RoutineDescriptor

java.lang.Object
  extended by de.grogra.xl.vmx.RoutineDescriptor
All Implemented Interfaces:
BooleanConsumer, ByteConsumer, CharConsumer, DoubleConsumer, FloatConsumer, IntConsumer, LongConsumer, ObjectConsumer, ShortConsumer, VoidConsumer

public final class RoutineDescriptor
extends java.lang.Object
implements BooleanConsumer, ByteConsumer, ShortConsumer, CharConsumer, IntConsumer, LongConsumer, FloatConsumer, DoubleConsumer, ObjectConsumer, VoidConsumer

A descriptor for a later invocation of a routine in a given frame context. Instances of RoutineDescriptor are obtained by VMXState.createDescriptor(Routine, int, Authorization).

Author:
Ole Kniemeyer

Method Summary
 void consume()
          Invokes the associated routine with no parameters.
 void consume(boolean value)
          Invokes the associated routine with a single boolean parameter.
 void consume(byte value)
          Invokes the associated routine with a single byte parameter.
 void consume(char value)
          Invokes the associated routine with a single char parameter.
 void consume(double value)
          Invokes the associated routine with a single double parameter.
 void consume(float value)
          Invokes the associated routine with a single float parameter.
 void consume(int value)
          Invokes the associated routine with a single int parameter.
 void consume(long value)
          Invokes the associated routine with a single long parameter.
 void consume(java.lang.Object value)
          Invokes the associated routine with a single Object parameter.
 void consume(short value)
          Invokes the associated routine with a single short parameter.
 void dispose()
          This method can be used to recycle this instance.
 AbruptCompletion.Return invoke()
          Invokes the associated routine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

consume

public void consume()
Invokes the associated routine with no parameters. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface VoidConsumer

consume

public void consume(boolean value)
Invokes the associated routine with a single boolean parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface BooleanConsumer

consume

public void consume(byte value)
Invokes the associated routine with a single byte parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface ByteConsumer

consume

public void consume(char value)
Invokes the associated routine with a single char parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface CharConsumer

consume

public void consume(double value)
Invokes the associated routine with a single double parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface DoubleConsumer

consume

public void consume(float value)
Invokes the associated routine with a single float parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface FloatConsumer

consume

public void consume(int value)
Invokes the associated routine with a single int parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface IntConsumer

consume

public void consume(long value)
Invokes the associated routine with a single long parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface LongConsumer

consume

public void consume(java.lang.Object value)
Invokes the associated routine with a single Object parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface ObjectConsumer

consume

public void consume(short value)
Invokes the associated routine with a single short parameter. The routine has to return an instance of AbruptCompletion.Return with a void type.

Specified by:
consume in interface ShortConsumer

dispose

public void dispose()
This method can be used to recycle this instance. If this descriptor is not needed any more, this method can be invoked in order to inform the VMXState that it may re-use this instance.


invoke

public AbruptCompletion.Return invoke()
Invokes the associated routine. Parameters have to be pushed on the stack in advance, the will be popped by the invocation.

Returns:
the return value of the routine