GODPAPER | All Packages | All Classes | Index | Frames No Frames |
Delegate

Package | org.spicefactory.lib.task.util
Class | public class Delegate
Inheritance | Delegate Object

A Delegate wraps a method and its parameters for deferred execution.

Public Methods

| Method | Defined By
--- | --- | ---
|  | Delegate(method:Function, params:Array = null) Creates a new Delegate for deferred execution. | Delegate
|  | invoke():* Invokes the Delegate. | Delegate

Constructor Detail

Delegate | () | Constructor

`public function Delegate(method:Function, params:Array = null)`

Creates a new Delegate for deferred execution.

Parameters

| `method:Function` — the method to execute
| `params:Array` (default = `null`)`` — the parameters to pass to the method

Method Detail

invoke | () | method

`public function invoke():*`

Invokes the Delegate.

Returns

| `*` — the return value of the executed method

Thu Jan 16 2014, 01:11 PM +08:00