发明名称 System supporting object-oriented constructs in ECMAScript
摘要 An internally consistent system implementing object-oriented programming constructs in ECMAScript is described. First, a function, rather than the ECMAScript new keyword, is used to initiate new instance creation. The instance creation function is assigned to a non-Function instance rather than an instance of Function as required for use of new. Instances with attached instance creation functions serve as "type proxy" objects and replace the Function instances normally used as types. Since the type proxies and prototype chains created and maintained by the invention are instances of normal objects, rather than instances of Function as required by standard ECMAScript, this approach allows native ECMAScript lookup semantics to be leveraged while supporting inheritance of both state and behavior for instances and types to any level desired. A set of functions known herein as property-definition functions are used by type proxies to assign properties as global, local, instance, or type properties rather than the standard ECMAScript approach of direct assignment. Where constraints exist such as "read-only", "private", etc. the physical storage of the property may be located away from the target object in a separate storage structure. Method definitions further place a "backstop" method on Object.prototype. Invocation of the backstop triggers a callback to the non-implementing receiver followed by a scan of guardians for multiple inheritance, followed by dynamic type conversion and method creation. The result is a highly enhanced system of polymorphic behavior.
申请公布号 US2007168949(A1) 申请公布日期 2007.07.19
申请号 US20060455569 申请日期 2006.06.19
申请人 SHATTUCK SCOTT;EDNEY WILLIAM J;BOWERY JAMES A 发明人 SHATTUCK SCOTT;EDNEY WILLIAM J.;BOWERY JAMES A.
分类号 G06F9/44;G06F9/46 主分类号 G06F9/44
代理机构 代理人
主权项
地址