Skip to main content

Inheritance Operations

Inheritance operations move features along the inheritance hierarchy.

Extract Subclass

In the metamodel, a feature is extracted into a new subclass and the feature is made mandatory. In the model, all instances of the superclass that have the feature set are migrated to the new subclass.

Parameters:
  • superClass: The superclass from which the feature is extracted
  • feature: The feature to be extracted
  • className: The name of the new subclass

Constraints:
  • The feature has to belong to the super class
  • The super class may not have a sub class

Extract Super Class

In the metamodel, a super class is extracted from a number of sub classes. In the model, nothing is changed.

Parameters:
  • subClasses: The classes from which the super class is extracted
  • toExtract: The features to be extracted
  • ePackage: The package in which the super class is created
  • superClassName: The name of the super class
  • abstr: Whether the super class is abstract
  • superSuperClasses: The super classes of the sub class which become super classes of the super class

Constraints:
  • The sub classes must have the super classes as common super classes
  • The features must not have opposite references
  • The features have to be all containment references or not
  • The features have to be all attributes or references
  • The features' multiplicities have to be the same
  • The features' types have to be the same

Fold Super Class

In the metamodel, a number of features are replaced by features of a new super class. In the model, the values are moved to these features based on a mapping.

Parameters:
  • subClass: The class to which the super class is added
  • superClass: The new super class
  • toReplace: The features to be replaced
  • replaceBy: The features by which they are replaced (in the same order)

Constraints:
  • The features must be of the same multiplicity
  • The features must be of the same type
  • The features to be replaced must belong to the sub class
  • The features to replace must be available in the super class
  • The number of features to be replaced and to replace them must be the same

Inline Sub Class

In the metamodel, the sub class is deleted. In the model, all instances of this sub class are migrated to its super class.

Parameters:
  • subClass: The class to be inlined

Constraints:
  • The super class must not be abstract
  • The sub class must have exactly one super type
  • The sub class must not have features
  • The sub class must not have sub types

Inline Super Class

In the metamodel, a super class is inlined into its sub classes. More specifically, its features are propagated to the sub classes. In the model, the values of these features have to be adapted accordingly.

Parameters:
  • superClass: The super class to be inlined

Constraints:
  • The super class must be abstract

Pull up Feature

In the metamodel, a number of features are pulled up into a common super class. In the model, values are changed accordingly.

Parameters:
  • features: The features to be pulled up
  • targetClass: The super class to which the features are pulled

Constraints:
  • The features' classes must have a common super type
  • The features' multiplicities have to be the same
  • The features must not have opposite references
  • The features have to be all containment references or not
  • The features' types have to be the same

Pull up Operation

In the metamodel, a number of operations are pulled up into a common super class. In the model, nothing needs to be done.

Parameters:
  • operations: The operations to be pulled up
  • targetClass: The super class to which the operations are pulled

Constraints:
  • The operations' multiplicities have to be the same
  • The operations' classes must have a common super type
  • The operations' types have to be the same

Push down Feature

In the metamodel, a feature is pushed down to its sub classes. In the model, values are changed accordingly.

Parameters:
  • feature: The feature to be pushed down

Constraints:
  • If the feature has an opposite, then the super class may only have one sub type.

Push down Operation

In the metamodel, an operation is pushed down to its sub classes. In the model, nothing needs to be done.

Parameters:
  • operation: The operation to be pushed down

Unfold Superclass

In the metamodel, a superclass is removed from a subclass, while all its features are copied into the subclass. In the model, values are changed accordingly.

Parameters:
  • subClass: The subclass
  • superClass: The superclass

Constraints:
  • The super class has to be a super type of the sub class
  • The super class must not be target of a reference

Back to the top