C# 클래스 Rhino.IdScriptableObject

상속: ScriptableObject, IdFunctionCall
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
ActivatePrototypeMap ( int maxPrototypeId ) : void
DefineOwnProperty ( Context cx, object key, ScriptableObject desc ) : void
Delete ( string name ) : void
ExecIdCall ( IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, object args ) : object

'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.

'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.

ExportAsJSClass ( int maxPrototypeId, Scriptable scope, bool @sealed ) : IdFunctionObject
Get ( string name, Scriptable start ) : object
GetAttributes ( string name ) : int
Has ( string name, Scriptable start ) : bool
HasPrototypeMap ( ) : bool
IdScriptableObject ( ) : System
IdScriptableObject ( Scriptable scope, Scriptable prototype ) : System
InitPrototypeConstructor ( IdFunctionObject f ) : void
InitPrototypeMethod ( object tag, int id, string name, int arity ) : void
InitPrototypeValue ( int id, string name, object value, int attributes ) : void
Put ( string name, Scriptable start, object value ) : void
SetAttributes ( string name, int attributes ) : void

보호된 메소드들

메소드 설명
AddIdFunctionProperty ( Scriptable obj, object tag, int id, string name, int arity ) : void
DefaultGet ( string name ) : object
DefaultPut ( string name, object value ) : void
FillConstructorProperties ( IdFunctionObject ctor ) : void
FindInstanceIdInfo ( string name ) : int

Map name to id of instance property.

Map name to id of instance property. Should return 0 if not found or the result of InstanceIdInfo(int, int) .

FindPrototypeId ( string name ) : int
GetInstanceIdName ( int id ) : string

Map id back to property name it defines.

Map id back to property name it defines.

GetInstanceIdValue ( int id ) : object

Get id value.

Get id value. If id value is constant, descendant can call cacheIdValue to store value in the permanent cache. Default implementation creates IdFunctionObject instance for given id and cache its value

GetMaxInstanceId ( ) : int

Get maximum id findInstanceIdInfo can generate.

Get maximum id findInstanceIdInfo can generate.

GetOwnPropertyDescriptor ( Context cx, object id ) : ScriptableObject
IncompatibleCallError ( IdFunctionObject f ) : EcmaError

Utility method to construct type error to indicate incompatible call when converting script thisObj to a particular type is not possible.

Utility method to construct type error to indicate incompatible call when converting script thisObj to a particular type is not possible. Possible usage would be to have a private function like realThis:

 private static NativeSomething realThis(Scriptable thisObj, IdFunctionObject f) { if (!(thisObj instanceof NativeSomething)) throw incompatibleCallError(f); return (NativeSomething)thisObj; } 
Note that although such function can be implemented universally via java.lang.Class.isInstance(), it would be much more slower.
InitPrototypeId ( int id ) : void
InstanceIdInfo ( int attributes, int id ) : int
SetInstanceIdAttributes ( int id, int attr ) : void

Update the attributes of the given instance property.

Update the attributes of the given instance property. Classes which want to support changing property attributes via Object.defineProperty must override this method. The default implementation throws InternalError.

SetInstanceIdValue ( int id, object value ) : void

Set or delete id value.

Set or delete id value. If value == NOT_FOUND , the implementation should make sure that the following getInstanceIdValue return NOT_FOUND.

비공개 메소드들

메소드 설명
GetBuiltInDescriptor ( string name ) : ScriptableObject
GetIds ( bool getAll ) : object[]
NewIdFunction ( object tag, int id, string name, int arity, Scriptable scope ) : IdFunctionObject
ReadObject ( ObjectInputStream stream ) : void
WriteObject ( ObjectOutputStream stream ) : void

메소드 상세

ActivatePrototypeMap() 공개 메소드

public ActivatePrototypeMap ( int maxPrototypeId ) : void
maxPrototypeId int
리턴 void

AddIdFunctionProperty() 보호된 메소드

protected AddIdFunctionProperty ( Scriptable obj, object tag, int id, string name, int arity ) : void
obj Scriptable
tag object
id int
name string
arity int
리턴 void

DefaultGet() 보호된 메소드

protected DefaultGet ( string name ) : object
name string
리턴 object

DefaultPut() 보호된 메소드

protected DefaultPut ( string name, object value ) : void
name string
value object
리턴 void

DefineOwnProperty() 공개 메소드

public DefineOwnProperty ( Context cx, object key, ScriptableObject desc ) : void
cx Context
key object
desc ScriptableObject
리턴 void

Delete() 공개 메소드

public Delete ( string name ) : void
name string
리턴 void

ExecIdCall() 공개 메소드

'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.
'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.
public ExecIdCall ( IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
f IdFunctionObject
cx Context
scope Scriptable
thisObj Scriptable
args object
리턴 object

ExportAsJSClass() 공개 메소드

public ExportAsJSClass ( int maxPrototypeId, Scriptable scope, bool @sealed ) : IdFunctionObject
maxPrototypeId int
scope Scriptable
@sealed bool
리턴 IdFunctionObject

FillConstructorProperties() 보호된 메소드

protected FillConstructorProperties ( IdFunctionObject ctor ) : void
ctor IdFunctionObject
리턴 void

FindInstanceIdInfo() 보호된 메소드

Map name to id of instance property.
Map name to id of instance property. Should return 0 if not found or the result of InstanceIdInfo(int, int) .
protected FindInstanceIdInfo ( string name ) : int
name string
리턴 int

FindPrototypeId() 보호된 메소드

protected FindPrototypeId ( string name ) : int
name string
리턴 int

Get() 공개 메소드

public Get ( string name, Scriptable start ) : object
name string
start Scriptable
리턴 object

GetAttributes() 공개 메소드

public GetAttributes ( string name ) : int
name string
리턴 int

GetInstanceIdName() 보호된 메소드

Map id back to property name it defines.
Map id back to property name it defines.
protected GetInstanceIdName ( int id ) : string
id int
리턴 string

GetInstanceIdValue() 보호된 메소드

Get id value.
Get id value. If id value is constant, descendant can call cacheIdValue to store value in the permanent cache. Default implementation creates IdFunctionObject instance for given id and cache its value
protected GetInstanceIdValue ( int id ) : object
id int
리턴 object

GetMaxInstanceId() 보호된 메소드

Get maximum id findInstanceIdInfo can generate.
Get maximum id findInstanceIdInfo can generate.
protected GetMaxInstanceId ( ) : int
리턴 int

GetOwnPropertyDescriptor() 보호된 메소드

protected GetOwnPropertyDescriptor ( Context cx, object id ) : ScriptableObject
cx Context
id object
리턴 ScriptableObject

Has() 공개 메소드

public Has ( string name, Scriptable start ) : bool
name string
start Scriptable
리턴 bool

HasPrototypeMap() 공개 메소드

public HasPrototypeMap ( ) : bool
리턴 bool

IdScriptableObject() 공개 메소드

public IdScriptableObject ( ) : System
리턴 System

IdScriptableObject() 공개 메소드

public IdScriptableObject ( Scriptable scope, Scriptable prototype ) : System
scope Scriptable
prototype Scriptable
리턴 System

IncompatibleCallError() 보호된 정적인 메소드

Utility method to construct type error to indicate incompatible call when converting script thisObj to a particular type is not possible.
Utility method to construct type error to indicate incompatible call when converting script thisObj to a particular type is not possible. Possible usage would be to have a private function like realThis:
 private static NativeSomething realThis(Scriptable thisObj, IdFunctionObject f) { if (!(thisObj instanceof NativeSomething)) throw incompatibleCallError(f); return (NativeSomething)thisObj; } 
Note that although such function can be implemented universally via java.lang.Class.isInstance(), it would be much more slower.
if no more instanceof target can be found
protected static IncompatibleCallError ( IdFunctionObject f ) : EcmaError
f IdFunctionObject /// function that is attempting to convert 'this' /// object. ///
리턴 EcmaError

InitPrototypeConstructor() 공개 메소드

public InitPrototypeConstructor ( IdFunctionObject f ) : void
f IdFunctionObject
리턴 void

InitPrototypeId() 보호된 메소드

protected InitPrototypeId ( int id ) : void
id int
리턴 void

InitPrototypeMethod() 공개 메소드

public InitPrototypeMethod ( object tag, int id, string name, int arity ) : void
tag object
id int
name string
arity int
리턴 void

InitPrototypeValue() 공개 메소드

public InitPrototypeValue ( int id, string name, object value, int attributes ) : void
id int
name string
value object
attributes int
리턴 void

InstanceIdInfo() 보호된 정적인 메소드

protected static InstanceIdInfo ( int attributes, int id ) : int
attributes int
id int
리턴 int

Put() 공개 메소드

public Put ( string name, Scriptable start, object value ) : void
name string
start Scriptable
value object
리턴 void

SetAttributes() 공개 메소드

public SetAttributes ( string name, int attributes ) : void
name string
attributes int
리턴 void

SetInstanceIdAttributes() 보호된 메소드

Update the attributes of the given instance property.
Update the attributes of the given instance property. Classes which want to support changing property attributes via Object.defineProperty must override this method. The default implementation throws InternalError.
protected SetInstanceIdAttributes ( int id, int attr ) : void
id int the instance property id
attr int the new attribute bitset
리턴 void

SetInstanceIdValue() 보호된 메소드

Set or delete id value.
Set or delete id value. If value == NOT_FOUND , the implementation should make sure that the following getInstanceIdValue return NOT_FOUND.
protected SetInstanceIdValue ( int id, object value ) : void
id int
value object
리턴 void