Decomposing a generic class into layers
First Claim
1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform:
- expanding a domain of genericity of an existing generic class comprising a plurality of class members, wherein one or more of the plurality of class members do not support at least part of the expanded domain of genericity, wherein the domain of genericity comprises a range of types over which the generic class is eligible for specialization, wherein for the expanded domain of genericity the range of types includes one or more reference types and one or more non-reference types, wherein the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity do not support specialization for the one or more non-reference types;
wherein said expanding comprises;
creating a subdivided version of the class that supports the expanded domain of genericity and preserves compatibility with the existing generic class, wherein creating the subdivided version of the class comprises;
including, in the subdivided version of the class, one or more indicators that identify one or more of the plurality of class members that support the expanded domain of genericity as part of a first layer of the subdivided version of the class, and the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity as part of a second layer of the subdivided version of the class.
2 Assignments
0 Petitions
Accused Products
Abstract
The domain of genericity of an existing generic class may be expanded to include not just reference types, but also primitive and value types even though some members of the existing class do not support the expanded genericity. A subdivided version of the class may be created that includes a generic layer including abstract versions of class members and a reference-specific layer that including non-abstract versions of class members that are abstract in the generic layer. The subdivided version of the class may also include information that indicates to which layer a class member belongs. Problematic methods (e.g., methods that have built-in assumptions regarding the domain of genericity) may be moved into the second, reference-specific, layer, thereby retaining compatibility with classes that currently instantiate or reference those methods, while still allowing use within the expanded domain of genericity.
46 Citations
20 Claims
-
1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform:
-
expanding a domain of genericity of an existing generic class comprising a plurality of class members, wherein one or more of the plurality of class members do not support at least part of the expanded domain of genericity, wherein the domain of genericity comprises a range of types over which the generic class is eligible for specialization, wherein for the expanded domain of genericity the range of types includes one or more reference types and one or more non-reference types, wherein the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity do not support specialization for the one or more non-reference types; wherein said expanding comprises; creating a subdivided version of the class that supports the expanded domain of genericity and preserves compatibility with the existing generic class, wherein creating the subdivided version of the class comprises; including, in the subdivided version of the class, one or more indicators that identify one or more of the plurality of class members that support the expanded domain of genericity as part of a first layer of the subdivided version of the class, and the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity as part of a second layer of the subdivided version of the class. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method implemented with a computing system having at least one processor coupled with memory-stored executable instructions which, when executed by the processor, cause the processor to perform the method, comprising:
-
expanding, by a compiler or a platform independent, object oriented runtime environment implemented on one or more computing devices, a domain of genericity of an existing generic class comprising a plurality of class members, wherein one or more of the plurality of class members do not support at least part of the expanded domain of genericity, wherein the domain of genericity comprises a range of types over which the generic class is eligible for specialization, wherein for the expanded domain of genericity the range of types includes one or more reference types and one or more non-reference types, wherein the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity do not support specialization for the one or more non-reference types; wherein said expanding comprises; creating, by the compiler or the platform independent, object oriented runtime environment, a subdivided version of the class that supports the expanded domain of genericity and preserves compatibility with the existing generic class, wherein creating the subdivided version of the class comprises; including, by the compiler or the platform independent, object oriented runtime environment, in the subdivided version of the class, one or more indicators that identify one or more of the plurality of class members that support the expanded domain of genericity as part of a first layer of the subdivided version of the class, and the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity as part of a second layer of the subdivided version of the class. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A computing device, comprising:
-
a processor; and a memory comprising program instructions, that when executed on the processor cause the processor to; expand a domain of genericity of an existing generic class comprising a plurality of class members, wherein one or more of the plurality of class members do not support at least part of the expanded domain of genericity, wherein the domain of genericity comprises a range of types over which the generic class is eligible for specialization, wherein for the expanded domain of genericity the range of types includes one or more reference types and one or more non-reference types, wherein the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity do not support specialization for the one or more non-reference types; wherein to expand the domain of genericity of the existing generic class the program instruction further cause the processor to; create a subdivided version of the class that supports the expanded domain of genericity and preserves compatibility with the existing generic class, wherein to create the subdivided version of the class comprises; include, in the subdivided version of the class, one or more indicators that identify one or more of the plurality of class members that support the expanded domain of genericity as part of a first layer of the subdivided version of the class and the one or more of the plurality of class members that do not support at least part of the expanded domain of genericity as part of a second layer of the subdivided version of the class. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification