org.mozilla.javascript
public class Delegator extends Object implements Function
See Also: Function Scriptable
| Field Summary | |
|---|---|
| protected Scriptable | obj |
| Constructor Summary | |
|---|---|
| Delegator()
Create a Delegator prototype.
| |
| Delegator(Scriptable obj)
Create a new Delegator that forwards requests to a delegee
Scriptable object.
| |
| Method Summary | |
|---|---|
| Object | call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) |
| Scriptable | construct(Context cx, Scriptable scope, Object[] args)
Note that if the delegee is null,
this method creates a new instance of the Delegator itself
rathert than forwarding the call to the
delegee. |
| void | delete(String name) |
| void | delete(int index) |
| Object | get(String name, Scriptable start) |
| Object | get(int index, Scriptable start) |
| String | getClassName() |
| Object | getDefaultValue(Class hint)
Note that this method does not get forwarded to the delegee if
the hint parameter is null,
ScriptRuntime.ScriptableClass or
ScriptRuntime.FunctionClass. |
| Scriptable | getDelegee()
Retrieve the delegee.
|
| Object[] | getIds() |
| Scriptable | getParentScope() |
| Scriptable | getPrototype() |
| boolean | has(String name, Scriptable start) |
| boolean | has(int index, Scriptable start) |
| boolean | hasInstance(Scriptable instance) |
| protected Delegator | newInstance()
Crete new Delegator instance.
|
| void | put(String name, Scriptable start, Object value) |
| void | put(int index, Scriptable start, Object value) |
| void | setDelegee(Scriptable obj)
Set the delegee.
|
| void | setParentScope(Scriptable parent) |
| void | setPrototype(Scriptable prototype) |
See Also: Delegator
Parameters: obj the delegee
See Also: Scriptable
See Also: Function
delegee is null,
this method creates a new instance of the Delegator itself
rathert than forwarding the call to the
delegee. This permits the use of Delegator
prototypes.
Parameters: cx the current Context for this thread scope an enclosing scope of the caller except when the function is called from a closure. args the array of arguments
Returns: the allocated object
See Also: (Context, Scriptable, Object[])
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
hint parameter is null,
ScriptRuntime.ScriptableClass or
ScriptRuntime.FunctionClass. Instead the object
itself is returned.
Parameters: hint the type hint
Returns: the default value
See Also: Scriptable
Returns: the delegee
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable
Parameters: obj the delegee
See Also: Scriptable
See Also: Scriptable
See Also: Scriptable