blob: 0ef0965b19537e33e546ca07ce122af42e6c55e6 [file] [log] [blame]
<div id="maincontent">
<div id="midcolumn">
<h1>Generalization / Specialization Operations</h1>
<p>
Generalization operations generalize feature or super type declarations, whereas specialization operations specialize them.
</p>
<h2 id="generalizeAttribute">Generalize Attribute</h2>
<p>
In the metamodel, the multiplicity of an attribute is generalized. In the model, nothing is changed.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>attribute</tt>: The attribute to be generalized</li>
<li><tt>lowerBound</tt>: The new lower bound</li>
<li><tt>upperBound</tt>: The new upper bound</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The multiplicity must be the same or more general</li>
</ul>
</p>
<h2 id="generalizeReference">Generalize Reference</h2>
<p>
In the metamodel, either the type or the multiplicity of a reference is generalized. In the model, nothing is changed.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>reference</tt>: The reference to be generalized</li>
<li><tt>type</tt>: The new type of the reference</li>
<li><tt>lowerBound</tt>: The new lower bound</li>
<li><tt>upperBound</tt>: The new upper bound</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The type must be the same or more general</li>
<li>The multiplicity must be the same or more general</li>
</ul>
</p>
<h2 id="generalizeSuperType">Generalize Super Type</h2>
<p>
In the metamodel, the super type of a class is replaced by its super types. In the model, the values of the features that the class inherits from that super type (excluding its super types) are deleted.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>eClass</tt>: The class of which the super type is replaced</li>
<li><tt>superType</tt>: The super type to be replaced by its super types</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super type to remove actually has to be a super type</li>
</ul>
</p>
<h2 id="removeSuperType">Remove Super Type</h2>
<p>
In the metamodel, a super type is removed from a class. In the model, the values of the features inherited from that super type (including its super types) are deleted.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>eClass</tt>: The class from which the super type is removed</li>
<li><tt>superType</tt>: The super type to be removed</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super type to be removed actually has to be a super type of the class</li>
</ul>
</p>
<h2 id="removeSuperfluousSuperType">Remove Superfluous Super Type</h2>
<p>
In the metamodel, a super type is removed from a class that is already inherited from another super class. In the model, nothing is changed, as this super type is superfluous.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>eClass</tt>: The class from which the super type is removed</li>
<li><tt>superType</tt>: The super type to be removed</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super type to be removed actually has to be a super type</li>
<li>The super type to be removed must be subsumed by one of the other super types</li>
</ul>
</p>
<h2 id="specializeComposition">Specialize Composition</h2>
<p>
In the metamodel, the type of a containment reference is specialized by a new sub class. In the model, the values of this reference are migrated to the new type.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>reference</tt>: The containment reference to be specialized</li>
<li><tt>ePackage</tt>: The package in which the sub class is created</li>
<li><tt>name</tt>: The name of the sub class</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The reference has to be a containment reference</li>
</ul>
</p>
<h2 id="specializeReference">Specialize Reference</h2>
<p>
In the metamodel, either the type or the multiplicity of a reference is specialized. In the model, values no longer conforming to the new type or multiplicity are removed.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>reference</tt>: The reference to be generalized</li>
<li><tt>type</tt>: The new type of the reference</li>
<li><tt>lowerBound</tt>: The new lower bound of the reference</li>
<li><tt>upperBound</tt>: The new upper bound of the reference</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The multiplicity must be the same or more special</li>
<li>The type must be the same or more special</li>
</ul>
</p>
<h2 id="specializeReferenceType">Specialize Reference Type</h2>
<p>
In the metamodel, the type of a reference can be specialized to its subclass, in case it is abstract and has only one subclass. In the model, nothing is changed.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>reference</tt>: The reference whose type is specialized</li>
<li><tt>type</tt>: The new type of the reference</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The new type of the reference must be a subclass of its old type</li>
<li>The old type of the reference must be abstract</li>
<li>The old type must not have any other subclass</li>
</ul>
</p>
<h2 id="specializeSuperType">Specialize Super Type</h2>
<p>
In the metamodel, the super type of a class is replaced by one of its sub classes. In the model, nothing is modified.
</p>
<p><h5>Parameters:</h5>
<ul>
<li><tt>eClass</tt>: The class whose super type is specialized</li>
<li><tt>toReplace</tt>: The super type which is replaced</li>
<li><tt>replaceBy</tt>: The sub class by which is replaced</li>
</ul>
</p>
<p>
<h5>Constraints:</h5>
<ul>
<li>The super type to be replaced must be a super type of the class</li>
<li>The replacing super type must be a sub type of the replaced super type</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>
<ul>
<li><a href="#generalizeAttribute">Generalize Attribute</a></li>
<li><a href="#generalizeReference">Generalize Reference</a></li>
<li><a href="#generalizeSuperType">Generalize Super Type</a></li>
<li><a href="#removeSuperType">Remove Super Type</a></li>
<li><a href="#removeSuperfluousSuperType">Remove Superfluous Super Type</a></li>
<li><a href="#specializeComposition">Specialize Composition</a></li>
<li><a href="#specializeReference">Specialize Reference</a></li>
<li><a href="#specializeReferenceType">Specialize Reference Type</a></li>
<li><a href="#specializeSuperType">Specialize Super Type</a></li>
</ul>
<li><a href="org.eclipse.emf.edapt.declaration.inheritance.InheritanceOperations.php">Inheritance Operations</a></li>
<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>