发明名称 Partial specialization of generic classes
摘要 Generic classes may have more than one specializable type parameter and it may be desirable to specialize one or more of the type variables while not specializing others. The result of partial specialization may be one or more additional generic classes that are further specializable on the remaining type parameters. A runtime specializer may partially specialize a generic class to produce a partially specialized class and may subsequently further specialize the partially specialized class to generate a fully specialized class. Thus, rather than performing the specialization of a generic class all at once, such as by specializing Map<K, V> into Map<int, int> or Map<long, int>, one type parameter may be partially specialized, such as resulting in Map<K, int>, and then at some later time the remaining type parameter(s) may be specialized, such as to generate Map<int, int> or Map<long, int>.
申请公布号 US9524152(B2) 申请公布日期 2016.12.20
申请号 US201514692592 申请日期 2015.04.21
申请人 Oracle International Corporation 发明人 Goetz Brian;Rose John R.;Buckley Alexander R.
分类号 G06F9/45;G06F9/445;G06F9/44 主分类号 G06F9/45
代理机构 Meyertons, Hood, Kivlin, Kowert & Goetzel, P.C. 代理人 Kowert Robert C.;Meyertons, Hood, Kivlin, Kowert & Goetzel, P.C.
主权项 1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform: partially specializing a generic class within a platform independent, object oriented runtime environment, wherein the generic class comprises a plurality of specializable type variables, wherein each of the plurality of specializable type variables are specializable over a plurality of type parameterizations; and wherein to partially specialize the generic class, the program instructions further cause the computing device to perform: specializing the generic class for a particular type variable of the plurality of specializable type variables over a particular type parameterization of the plurality of type parameterizations, without specializing the generic class for at least one other of the plurality of specializable type variables, such that the partially specialized generic class is further specializable for the at least one other specializable type variable over each of the plurality of type parameterizations.
地址 Redwood City CA US