C# Class Jurassic.Library.FunctionInstance

Represents a JavaScript function.
Inheritance: ObjectInstance
Mostrar archivo Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
CallLateBound ( object thisObject ) : object

Calls this function, passing in the given "this" value and zero or more arguments.

CallWithStackTrace ( string path, string function, int line, object thisObject, object argumentValues ) : object

Calls this function, passing in the given "this" value and zero or more arguments.

ConstructLateBound ( ) : ObjectInstance

Creates an object, using this function as the constructor.

HasInstance ( object instance ) : bool

Determines whether the given object inherits from this function. More precisely, it checks whether the prototype chain of the object contains the prototype property of this function. Used by the "instanceof" operator.

ToString ( ) : string

Returns a string representing this object.

Protected Methods

Method Description
FunctionInstance ( ObjectInstance prototype ) : System

Creates a new instance of a built-in function object.

FunctionInstance ( ScriptEngine engine ) : System

Creates a new instance of a built-in function object, with the default Function prototype.

FunctionInstance ( ScriptEngine engine, ObjectInstance prototype ) : System

Creates a new instance of a built-in function object.

Private Methods

Method Description
Apply ( object thisObj, object arguments ) : object
Bind ( object boundThis ) : FunctionInstance
Call ( object thisObj ) : object
CallFromNative ( string function, object thisObject ) : object

Calls this function, passing in the given "this" value and zero or more arguments.

GetDeclarativeProperties ( ScriptEngine engine ) : List
InitializePrototypeProperties ( ObjectInstance obj, FunctionConstructor constructor ) : void

Initializes the prototype properties.

ToStringJS ( ) : string
__STUB__Apply ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Bind ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__Call ( ScriptEngine engine, object thisObj, object args ) : object
__STUB__ToStringJS ( ScriptEngine engine, object thisObj, object args ) : object

Method Details

CallLateBound() public abstract method

Calls this function, passing in the given "this" value and zero or more arguments.
public abstract CallLateBound ( object thisObject ) : object
thisObject object The value of the "this" keyword within the function.
return object

CallWithStackTrace() public method

Calls this function, passing in the given "this" value and zero or more arguments.
public CallWithStackTrace ( string path, string function, int line, object thisObject, object argumentValues ) : object
path string The path of the javascript source file that contains the caller.
function string The name of the caller function.
line int The line number of the statement that is calling this function.
thisObject object The value of the "this" keyword within the function.
argumentValues object An array of argument values.
return object

ConstructLateBound() public method

Creates an object, using this function as the constructor.
public ConstructLateBound ( ) : ObjectInstance
return ObjectInstance

FunctionInstance() protected method

Creates a new instance of a built-in function object.
protected FunctionInstance ( ObjectInstance prototype ) : System
prototype ObjectInstance The next object in the prototype chain.
return System

FunctionInstance() protected method

Creates a new instance of a built-in function object, with the default Function prototype.
protected FunctionInstance ( ScriptEngine engine ) : System
engine ScriptEngine The associated script engine.
return System

FunctionInstance() protected method

Creates a new instance of a built-in function object.
protected FunctionInstance ( ScriptEngine engine, ObjectInstance prototype ) : System
engine ScriptEngine The associated script engine.
prototype ObjectInstance The next object in the prototype chain. Can be null.
return System

HasInstance() public method

Determines whether the given object inherits from this function. More precisely, it checks whether the prototype chain of the object contains the prototype property of this function. Used by the "instanceof" operator.
public HasInstance ( object instance ) : bool
instance object The instance to check.
return bool

ToString() public method

Returns a string representing this object.
public ToString ( ) : string
return string