Class Type
A Type constrains the values represented by a TypedElement. <p>From package UML::CommonStructure.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Type")]
public abstract class Type : PackageableElement, IType, IPackageableElement, IParameterableElement, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Type
- Implements
- Inherited Members
Properties
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
Package
Specifies the owning Package of this Type, if any. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("package")]
[XmlAttribute(true)]
[XmlOpposite("ownedType")]
public IPackage Package { get; set; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Methods
ConformsTo(IType)
The query conformsTo() gives true for a Type that conforms to another. By default, two Types do not conform to each other. This query is intended to be redefined for specific conformance situations. result = (false) <p>From package UML::CommonStructure.</p>
public bool ConformsTo(IType other)
Parameters
other
IType
Returns
CreateAssociation(bool, AggregationKind, string, int, object, IType, bool, AggregationKind, string, int, object)
Creates a(n) (binary) association between this type and the specified other type, with the specified navigabilities, aggregations, names, lower bounds, and upper bounds, and owned by this type's nearest package.
public IAssociation CreateAssociation(bool end1IsNavigable, AggregationKind end1Aggregation, string end1Name, int end1Lower, object end1Upper, IType end1Type, bool end2IsNavigable, AggregationKind end2Aggregation, string end2Name, int end2Lower, object end2Upper)
Parameters
end1IsNavigable
boolThe navigability for the first end of the new association.
end1Aggregation
AggregationKindThe aggregation for the first end of the new association.
end1Name
stringThe name for the first end of the new association.
end1Lower
intThe lower bound for the first end of the new association.
end1Upper
objectThe upper bound for the first end of the new association.
end1Type
ITypeThe type for the first end of the new association.
end2IsNavigable
boolThe navigability for the second end of the new association.
end2Aggregation
AggregationKindThe aggregation for the second end of the new association.
end2Name
stringThe name for the second end of the new association.
end2Lower
intThe lower bound for the second end of the new association.
end2Upper
objectThe upper bound for the second end of the new association.
Returns
GetAssociations()
Retrieves the associations in which this type is involved.
public ISetExpression<IAssociation> GetAssociations()
Returns
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetExpressionForReference(string)
Gets the property expression for the given reference
protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)
Parameters
reference
stringThe requested reference in upper case
Returns
- INotifyExpression<IModelElement>
An incremental property expression
GetModelElementForReference(string, int)
Resolves the given URI to a child model element
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Returns
- IModelElement
The model element or null if it could not be found
OnParentChanged(IModelElement, IModelElement)
Gets called when the parent model element of the current model element changes
protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)
Parameters
newParent
IModelElementThe new parent model element
oldParent
IModelElementThe old parent model element
OnParentChanging(IModelElement, IModelElement)
Gets called when the parent model element of the current model element is about to change
protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)
Parameters
newParent
IModelElementThe new parent model element
oldParent
IModelElementThe old parent model element
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)