blob: 1fd396dcfd58e03770c54b6630a8df5053dc17b6 [file] [log] [blame]
<div id="maincontent">
<div id="midcolumn">
<h1>Inheritance Operations</h1>
<p>
Inheritance operations move features along the inheritance hierarchy.
</p>
<h2 id="extractSubClass">Extract Subclass</h2>
<p>
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.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>superClass</tt>: The superclass from which the feature is extracted</li>
<li><tt>feature</tt>: The feature to be extracted</li>
<li><tt>className</tt>: The name of the new subclass</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The feature has to belong to the super class</li>
<li>The super class may not have a sub class</li>
</ul>
</p>
<h2 id="extractSuperClass2">Extract Super Class</h2>
<p>
In the metamodel, a super class is extracted from a number of sub classes. In the model, nothing is changed.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>subClasses</tt>: The classes from which the super class is extracted</li>
<li><tt>toExtract</tt>: The features to be extracted</li>
<li><tt>ePackage</tt>: The package in which the super class is created</li>
<li><tt>superClassName</tt>: The name of the super class</li>
<li><tt>abstr</tt>: Whether the super class is abstract</li>
<li><tt>superSuperClasses</tt>: The super classes of the sub class which become super classes of the super class</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The sub classes must have the super classes as common super classes</li>
<li>The features must not have opposite references</li>
<li>The features have to be all containment references or not</li>
<li>The features have to be all attributes or references</li>
<li>The features' multiplicities have to be the same</li>
<li>The features' types have to be the same</li>
</ul>
</p>
<h2 id="useSuperClass">Fold Super Class</h2>
<p>
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.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>subClass</tt>: The class to which the super class is added</li>
<li><tt>superClass</tt>: The new super class</li>
<li><tt>toReplace</tt>: The features to be replaced</li>
<li><tt>replaceBy</tt>: The features by which they are replaced (in the same order)</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The features must be of the same multiplicity</li>
<li>The features must be of the same type</li>
<li>The features to be replaced must belong to the sub class</li>
<li>The features to replace must be available in the super class</li>
<li>The number of features to be replaced and to replace them must be the same</li>
</ul>
</p>
<h2 id="inlineSubClass">Inline Sub Class</h2>
<p>
In the metamodel, the sub class is deleted. In the model, all instances of this sub class are migrated to its super class.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>subClass</tt>: The class to be inlined</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super class must not be abstract</li>
<li>The sub class must have exactly one super type</li>
<li>The sub class must not have features</li>
<li>The sub class must not have sub types</li>
</ul>
</p>
<h2 id="inlineSuperClass">Inline Super Class</h2>
<p>
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.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>superClass</tt>: The super class to be inlined</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super class must be abstract</li>
</ul>
</p>
<h2 id="pullFeature">Pull up Feature</h2>
<p>
In the metamodel, a number of features are pulled up into a common super class. In the model, values are changed accordingly.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>features</tt>: The features to be pulled up</li>
<li><tt>targetClass</tt>: The super class to which the features are pulled</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The features' classes must have a common super type</li>
<li>The features' multiplicities have to be the same</li>
<li>The features must not have opposite references</li>
<li>The features have to be all containment references or not</li>
<li>The features' types have to be the same</li>
</ul>
</p>
<h2 id="pullOperation">Pull up Operation</h2>
<p>
In the metamodel, a number of operations are pulled up into a common super class. In the model, nothing needs to be done.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>operations</tt>: The operations to be pulled up</li>
<li><tt>targetClass</tt>: The super class to which the operations are pulled</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The operations' multiplicities have to be the same</li>
<li>The operations' classes must have a common super type</li>
<li>The operations' types have to be the same</li>
</ul>
</p>
<h2 id="pushFeature">Push down Feature</h2>
<p>
In the metamodel, a feature is pushed down to its sub classes. In the model, values are changed accordingly.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>feature</tt>: The feature to be pushed down</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>If the feature has an opposite, then the super class may only have one sub type.</li>
</ul>
</p>
<h2 id="pushOperation">Push down Operation</h2>
<p>
In the metamodel, an operation is pushed down to its sub classes. In the model, nothing needs to be done.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>operation</tt>: The operation to be pushed down</li>
</ul>
</p>
<h2 id="imitateSuperType">Unfold Superclass</h2>
<p>
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.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>subClass</tt>: The subclass</li>
<li><tt>superClass</tt>: The superclass</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super class has to be a super type of the sub class</li>
<li>The super class must not be target of a reference</li>
</ul>
</p>
</div>
<div id="rightcolumn">
<div class="sideitem">
<h6>Contents</h6>
<ul>
<li><a href="org.eclipse.emf.edapt.declaration.creation.StructuralPrimitives.php">Structural Primitives</a></li>
<li><a href="org.eclipse.emf.edapt.declaration.simple.NonStructuralPrimitives.php">Non-structural Primitives</a></li>
<li><a href="org.eclipse.emf.edapt.declaration.generalization.GeneralizationOperations.php">Generalization / Specialization Operations</a></li>
<li><a href="org.eclipse.emf.edapt.declaration.inheritance.InheritanceOperations.php">Inheritance Operations</a></li>
<ul>
<li><a href="#extractSubClass">Extract Subclass</a></li>
<li><a href="#extractSuperClass2">Extract Super Class</a></li>
<li><a href="#useSuperClass">Fold Super Class</a></li>
<li><a href="#inlineSubClass">Inline Sub Class</a></li>
<li><a href="#inlineSuperClass">Inline Super Class</a></li>
<li><a href="#pullFeature">Pull up Feature</a></li>
<li><a href="#pullOperation">Pull up Operation</a></li>
<li><a href="#pushFeature">Push down Feature</a></li>
<li><a href="#pushOperation">Push down Operation</a></li>
<li><a href="#imitateSuperType">Unfold Superclass</a></li>
</ul>
<li><a href="org.eclipse.emf.edapt.declaration.delegation.DelegationOperations.php">Delegation Operations</a></li>
<li><a href="org.eclipse.emf.edapt.declaration.replacement.ReplacementOperations.php">Replacement Operations</a></li>
<li><a href="org.eclipse.emf.edapt.declaration.merge.MergeOperations.php">Merge Operations</a></li>
</ul>
</div>
</div>
</div>