Patent ID: 7596572

Claim:
A method of categorical mapping of valuetypes, the method comprising: at a computer, receiving, as input, a valuetype within an object model specification; applying a categorical-based generator that applies at least one morphism to the object model specification, application of the categorical-based generator including: i) generating an interface that exposes the valuetype in an interface object model comprising: simulating, in the interface object model, a valuetype hierarchy for the valuetype in which a first valuetype inherits from a second valuetype; ii) generating an implementation of the interface that exposes the valuetype in a middleware implementation object model, wherein generating the implementation of the interface that exposes the valuetype in a middleware implementation object model comprises: providing a delegation scheme for the valuetype hierarchy for the valuetype in which the first valuetype inherits from the second valuetype by generating a class that implements the first valuetype, in the middleware implementation object model, the class delegating to middleware through a private member delegate, a type of the private member delegate extends a corresponding middleware valuetype, wherein the providing the delegation schema comprises: implementing the valuetype hierarchy through delegation within the class using a private strongly-typed morphism; and implementing the valuetype hierarchy through delegation throughout the interface object model using a weakly-typed morphism; wherein the applying a categorical-based generator that applies at least one morphism to the object model specification comprises: performing an application-level cast of an interface object model valuetype object using a plain Java-syntax cast; and applying an inverse morphism to create an instance of the middleware-implementation object model that corresponds to an actual type of a delegate.