|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.schmant.lang.ClosureSupport
public final class ClosureSupport
Static utility class for running closures. When Schmant launches, the
script language executor registers itself here as a ClosureRunner.
| Method Summary | |
|---|---|
static boolean |
isClosure(Object o)
Is the supplied object a closure? If the running ScriptExecutor does not support closures, this method
always returns false. |
static void |
registerClosureRunner(ClosureRunner cr)
|
static Object |
runClosure(Object closure,
Object... arguments)
Run the closure and return the result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void registerClosureRunner(ClosureRunner cr)
public static boolean isClosure(Object o)
ScriptExecutor does not support closures, this method
always returns false.
o - The object to investigate.
true if the supplied object is a closure that the
running script executor can run.
public static Object runClosure(Object closure,
Object... arguments)
closure - The closure to run.arguments - The arguments to the closure.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||