5. The non-transitory, computer-readable storage medium of claim 1 , wherein the class declaration for the generic class comprises information indicating that the refinement method is generic over one or more of the plurality of type parameterizations.
1. A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform: loading a class file comprising a class declaration for a generic class, wherein the generic class is specializable over a plurality of type parameterizations, wherein the class declaration comprises a refinement method specific to a particular one of the plurality of type parameterizations, wherein the refinement method comprises an alternate implementation for a method of the generic class when the generic class is specialized for the particular type parameterization; specializing the generic class for the particular type parameterization; and including the refinement method in the specialized generic class in response to said specializing and based on the particular type parameterization.