发明名称 EXECUTION OF PARAMETERIZED CLASSES ON LEGACY VIRTUAL MACHINES
摘要 Techniques herein processes type assignments for a generic class to generate a concrete class. In an embodiment, a computer analyzes a client class to detect a dependency on a generic class having type parameters. The client class contains a specialization context that specifies type assignments for the type parameters. Each type parameter is associated with particular type entries in the generic class that identify an erasure type to use in case the type parameter is erased. The computer generates instantiation metadata for the generic class including, for each type entry, performing the following. In response to determining that the specialization context specifies binding a particular type to the type parameter associated with the type entry, the computer generates an entry for the instantiation metadata that identifies the particular type. Otherwise, the computer generates an entry for the instantiation metadata that identifies an erasure type of the type entry.
申请公布号 US2017116007(A1) 申请公布日期 2017.04.27
申请号 US201615332346 申请日期 2016.10.24
申请人 ORACLE INTERNATIONAL CORPORATION 发明人 Cimadamore Maurizio;Goetz Brian
分类号 G06F9/455;G06F9/44 主分类号 G06F9/455
代理机构 代理人
主权项 1. A method comprising: analyzing a definition of a client class to detect that the client class depends on a generic class having one or more type parameters, wherein the client class contains a specialization context that specifies zero or more type assignments for zero or more of the one or more type parameters of the generic class, wherein a definition of the generic class contains one or more type entries, wherein each type parameter of the one or more type parameters is associated with one or more particular type entries of the one or more type entries, wherein, for each type parameter of the one or more type parameters, the one or more particular type entries associated with the type parameter identifies a respective erasure type to use in case the type parameter is erased; generating instantiation metadata for the generic class by at least: for each type entry of the one or more type entries within the definition of the generic class:in response to a determination that the specialization context specifies binding a particular type to the type parameter associated with the type entry, generating an entry for the instantiation metadata that identifies the particular type,in response to a determination that the specialization context specifies erasure for the type parameter associated with the type entry, generating an entry for the instantiation metadata that identifies the respective erasure type of the type entry.
地址 Mail Stop 50P7 CA US