发明名称 Instantiating an interface or abstract class in application code
摘要 Mechanisms for instantiating an interface or abstract class in application code are provided. An object-oriented programming language is extended such that interfaces and abstract classes can be instantiated in application code without a concrete class specified. Metadata is defined which maps each interface or abstract class instantiation in the application code to a concrete class to be used either by the compiler at build time, or the virtual machine at runtime. Once the appropriate concrete class is determined from the metadata, the class is instantiated with a conventional class loader. The metadata may be provided, for example, as a separate file, such as a markup language file, defined with a virtual machine switch, as annotations in the application code, or the like.
申请公布号 US8819650(B2) 申请公布日期 2014.08.26
申请号 US201213468142 申请日期 2012.05.10
申请人 International Business Machines Corporation 发明人 Barcia Roland;Bhogal Kulvir S.;Hambrick Geoffrey M.;Peterson Robert R.
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人 Walder, Jr. Stephen J.;Mims, Jr. David A.
主权项 1. A method, in a data processing system, for instantiating an abstract class, comprising: providing mapping metadata for mapping an abstract class to a corresponding concrete class implementing the abstract class; encountering an instantiation statement for the abstract class during processing of application code, wherein the instantiation statement does not specify a concrete class implementing the abstract class; and converting the instantiation statement to specify the concrete class implementing the abstract class based on the mapping metadata.
地址 Armonk NY US