|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.erights.e.elib.ref.OneArgFuncAdapter
Untamed: Sends a message to target containing a cheap 1-argument function as argument. When this function is called it calls a method on the reactor with its argument. It's like the following E code:
def OneArgFuncAdapter adapt(target, whenVerb, reactor, onVerb) {
def adapter(arg) {
E sendOnly(reactor, onVerb, [arg]);
}
E sendOnly(target, whenVerb, [adapter])
}
Note that the on method (the method named by the onVerb) will be invoked
after an additional send.
| Field Summary | |
private String |
myOnVerb
|
private Object |
myReactor
|
| Constructor Summary | |
OneArgFuncAdapter(Object reactor,
String onVerb)
Enabled: |
|
| Method Summary | |
void |
__printOn(TextWriter out)
Enabled: |
static Throwable |
adapt(Object target,
String whenVerb,
Object reactor,
String onVerb)
Enabled: |
Object |
run(Object arg)
Enabled: |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final Object myReactor
private final String myOnVerb
| Constructor Detail |
public OneArgFuncAdapter(Object reactor,
String onVerb)
| Method Detail |
public static Throwable adapt(Object target,
String whenVerb,
Object reactor,
String onVerb)
public Object run(Object arg)
run in interface OneArgFunc
public void __printOn(TextWriter out)
throws IOException
IOException
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||