org.mozilla.javascript

Class IdFunctionObject

Implemented Interfaces:
Callable, DebuggableObject, Function, IdFunctionCall, Scriptable, Serializable

public class IdFunctionObject
extends BaseFunction

Field Summary

Fields inherited from class org.mozilla.javascript.ScriptableObject

DONTENUM, EMPTY, PERMANENT, READONLY

Fields inherited from interface org.mozilla.javascript.Scriptable

NOT_FOUND

Constructor Summary

IdFunctionObject(IdFunctionCall idcall, Object tag, int id, String name, int arity, Scriptable scope)
IdFunctionObject(IdFunctionCall idcall, Object tag, int id, int arity)

Method Summary

void
addAsProperty(Scriptable target)
Object
call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
Perform the call.
Scriptable
createObject(Context cx, Scriptable scope)
void
exportAsScopeProperty()
int
getArity()
String
getFunctionName()
int
getLength()
Scriptable
getPrototype()
Get the prototype of the object.
boolean
hasTag(Object tag)
void
initFunction(String name, Scriptable scope)
void
markAsConstructor(Scriptable prototypeProperty)
int
methodId()
RuntimeException
unknown()

Methods inherited from class org.mozilla.javascript.BaseFunction

call, construct, createObject, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, getArity, getClassName, getClassPrototype, getFunctionName, getInstanceIdName, getInstanceIdValue, getLength, getMaxInstanceId, hasInstance, initPrototypeId, setImmunePrototypeProperty, setInstanceIdValue

Methods inherited from class org.mozilla.javascript.IdScriptableObject

activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, execIdCall, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, get, getAttributes, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeId, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes, setInstanceIdValue

Methods inherited from class org.mozilla.javascript.ScriptableObject

associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setParentScope, setPrototype

Constructor Details

IdFunctionObject

public IdFunctionObject(IdFunctionCall idcall,
                        Object tag,
                        int id,
                        String name,
                        int arity,
                        Scriptable scope)

IdFunctionObject

public IdFunctionObject(IdFunctionCall idcall,
                        Object tag,
                        int id,
                        int arity)

Method Details

addAsProperty

public final void addAsProperty(Scriptable target)

call

public Object call(Context cx,
                   Scriptable scope,
                   Scriptable thisObj,
                   Object[] args)
Perform the call.
Specified by:
call in interface Function
call in interface Callable
Overrides:
call in interface BaseFunction
Parameters:
cx - the current Context for this thread
scope - the scope to use to resolve properties.
thisObj - the JavaScript this object
args - the array of arguments
Returns:
the result of the call

createObject

public Scriptable createObject(Context cx,
                               Scriptable scope)
Overrides:
createObject in interface BaseFunction

exportAsScopeProperty

public void exportAsScopeProperty()

getArity

public int getArity()
Overrides:
getArity in interface BaseFunction

getFunctionName

public String getFunctionName()
Overrides:
getFunctionName in interface BaseFunction

getLength

public int getLength()
Overrides:
getLength in interface BaseFunction

getPrototype

public Scriptable getPrototype()
Get the prototype of the object.
Specified by:
getPrototype in interface Scriptable
Overrides:
getPrototype in interface ScriptableObject
Returns:
the prototype

hasTag

public final boolean hasTag(Object tag)

initFunction

public void initFunction(String name,
                         Scriptable scope)

markAsConstructor

public final void markAsConstructor(Scriptable prototypeProperty)

methodId

public final int methodId()

unknown

public final RuntimeException unknown()