首页>
外国专利>
A METHOD OF IMPLEMENTING PARAMETERIZED TYPES TO BE COMPATIBLE WITH EXISTING UNPARAMETERIZED LIBRARIES
A METHOD OF IMPLEMENTING PARAMETERIZED TYPES TO BE COMPATIBLE WITH EXISTING UNPARAMETERIZED LIBRARIES
展开▼
机译:一种实现参数化类型与现有未参数化库兼容的方法
展开▼
页面导航
摘要
著录项
相似文献
摘要
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.
展开▼