|
ref_send API 2.9 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ref_send.promise.Local<T>
T - referent typepublic abstract class Local<T>
Implementation hook that users should ignore.
An abstract base class for a promise implementation that is scoped to a particular event queue.
| Method Summary | ||
|---|---|---|
abstract T |
call()
Gets the current referent. |
|
static
|
curry(java.lang.reflect.Method method,
ConstArray<?> argv)
Constructs a pending invocation. |
|
abstract boolean |
equals(java.lang.Object x)
|
|
abstract int |
hashCode()
|
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Forwards a Java language invocation. |
|
static java.lang.reflect.Type |
parameter(Do<?,?> x)
Determines a block's parameter type. |
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public abstract boolean equals(java.lang.Object x)
equals in class java.lang.Objectpublic abstract int hashCode()
hashCode in interface SelflesshashCode in class java.lang.Object
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Exception
invoke in interface java.lang.reflect.InvocationHandlerproxy - eventual referencemethod - method to invokeargs - each invocation argument
java.lang.Exception
public abstract T call()
throws java.lang.Exception
PromiseFor example:
final Promise<Foo> foo = …
try {
foo.call().bar();
} catch (final Exception reason) {
// Either there is no referent, or the bar() invocation failed.
throw reason;
}
call in interface Promise<T>java.lang.Exception - reason the referent is not known
public static <T> Do<T,java.lang.Object> curry(java.lang.reflect.Method method,
ConstArray<?> argv)
method - method to invokeargv - invocation argumentspublic static java.lang.reflect.Type parameter(Do<?,?> x)
x - block to introspect on
x's parameter type
|
ref_send API 2.9 defensive programming in Java |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.