发明授权
- 专利标题: Method of implementing parameterized types to be compatible with existing unparameterized libraries
- 专利标题(中): 实现与现有的无参数化库兼容的参数化类型的方法
-
申请号: US98126申请日: 1998-06-16
-
公开(公告)号: US6018628A公开(公告)日: 2000-01-25
- 发明人: David P. Stoutamire
- 申请人: David P. Stoutamire
- 申请人地址: CA Palo Alto
- 专利权人: Sun Microsystems, Inc.
- 当前专利权人: Sun Microsystems, Inc.
- 当前专利权人地址: CA Palo Alto
- 主分类号: G06F9/44
- IPC分类号: G06F9/44 ; G06F9/45
摘要:
A method and apparatus for generating code using parameterized classes which is compatible with an existing class library that was previously generated using unparameterized classes is disclosed. According to the method, parameterized source code is received that contains variables that belong to a plurality of types which are defined by supplying parameter values to a parameterized class definition. Static type checking is performed on the parameterized source code to determine if any incompatible type assignments exist between variables that belong to the plurality of types and values assigned to the variables. If no incompatible type assignments exist, then a homogeneous translation is performed on the parameterized source code to generate unparameterized class code. The unparameterized class code is then compiled to produce code that is compatible with the existing class library that was generated using unparameterized classes.
公开/授权文献
- USD414192S Customer interface module for fuel dispenser 公开/授权日:1999-09-21
信息查询