首页> 外国专利> AUGMENTING AN ORIGINAL CLASS WITH AN AUGMENTING CLASS

AUGMENTING AN ORIGINAL CLASS WITH AN AUGMENTING CLASS

机译:用增强类增强原始类

摘要

An augmenting system for augmenting a program's original class with an augmenting class is provided. In some embodiments, the augmenting system receives a definition of an augmenting class that includes a data member. The augmenting system generates resolution code for the computer program. The resolution code is for accessing a reference to an original instance of the original class and providing a reference to a corresponding augmenting instance of the augmenting class. When processing a statement of the computer program that accesses the data member using the reference to the original instance, the augmenting system generates access code for the computer program. The access code uses the resolution code to retrieve the reference to the augmenting instance for the original instance and accesses the data member based on the retrieved reference to the augmenting instance.
机译:提供了一种用于使用扩展类来扩展程序的原始类的扩展系统。在一些实施例中,扩充系统接收包括数据成员的扩充类的定义。扩充系统为计算机程序生成解析代码。解析代码用于访问对原始类的原始实例的引用,并提供对扩充类的相应扩充实例的引用。当处理使用对原始实例的引用来访问数据成员的计算机程序的语句时,扩充系统会生成计算机程序的访问代码。访问代码使用解析代码来检索对原始实例的扩展实例的引用,并基于所获取的对扩展实例的引用来访问数据成员。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号