1. In a programming model using a modeling language, a Computer method for enforcing derived union constraints comprising: given the modeling language is of the Unified Modeling Language (UML) type, using the modeling language, defining metaclasses and having model elements as instances of metaclasses, model elements including properties having respective values, and UML-derived-union-constraints being distinct from stereotypes and being constraints on model elements defined by a superset of values of a respective property; providing a model element having one or more derived union properties, each derived union property having a superset of values denoted by the property; tracking UML-derived-union-constraints from the one or more derived union properties of the model element, including keeping track of derived union items of the model element; interpreting the tracked UML-derived-union-constraints and generating therefrom an Application Program Interface code implementation that enforces the UML-derived-union-constraint, including generating code implementing overriding operations on classes that contain subsetting properties for the one or more derived union properties of the model element, wherein the tracking provides to the interpreting indications of which properties the operations represent a superset; and outputting the generated Application Program Interface code to a user.
1. In a programming model using a modeling language, a Computer method for enforcing derived union constraints comprising: given the modeling language is of the Unified Modeling Language (UML) type, using the modeling language, defining metaclasses and having model elements as instances of metaclasses, model elements including properties having respective values, and UML-derived-union-constraints being distinct from stereotypes and being constraints on model elements defined by a superset of values of a respective property; providing a model element having one or more derived union properties, each derived union property having a superset of values denoted by the property; tracking UML-derived-union-constraints from the one or more derived union properties of the model element, including keeping track of derived union items of the model element; interpreting the tracked UML-derived-union-constraints and generating therefrom an Application Program Interface code implementation that enforces the UML-derived-union-constraint, including generating code implementing overriding operations on classes that contain subsetting properties for the one or more derived union properties of the model element, wherein the tracking provides to the interpreting indications of which properties the operations represent a superset; and outputting the generated Application Program Interface code to a user. 4. A method as claimed in claim 1 wherein the step of tracking includes recording derived union constraint information as an annotation to the model element.