public static class SequenceDriver.ApplyingAdvanceHook extends java.lang.Object implements SequenceDriver.AdvanceHook
Generic SequenceDriver.AdvanceHook impl that delegates to an object
implementing an apply(Object[]) method.
The apply(Object[]) method is passed the argument vector
{index} where index is the new waypoint.
This is for integration with higher-level scripting environments such as JScheme.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
appliccable
the delegate
|
protected java.lang.reflect.Method |
applyMethod
the apply method on the delegate
|
| Constructor and Description |
|---|
SequenceDriver.ApplyingAdvanceHook(java.lang.Object appliccable)
uses default applyMethodName
|
SequenceDriver.ApplyingAdvanceHook(java.lang.Object appliccable,
java.lang.String applyMethodName)
Make a new delegating hook.
|
| Modifier and Type | Method and Description |
|---|---|
void |
advanced(int index)
Delegates to
appliccable.apply(Object[]), see
class header doc. |
protected final java.lang.Object appliccable
protected final java.lang.reflect.Method applyMethod
public SequenceDriver.ApplyingAdvanceHook(java.lang.Object appliccable,
java.lang.String applyMethodName)
Make a new delegating hook.
applyMethodName - the name of the apply(Object[]) method,
or null to use "apply"public SequenceDriver.ApplyingAdvanceHook(java.lang.Object appliccable)
public void advanced(int index)
Delegates to appliccable.apply(Object[]), see
class header doc.
advanced in interface SequenceDriver.AdvanceHook