Class Component
A Component represents a modular part of a system that encapsulates its contents and whose manifestation is replaceable within its environment. <p>From package UML::StructuredClassifiers.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Component")]
public class Component : Class, IComponent, IClass, IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Component
- Implements
- Inherited Members
Constructors
Component()
Creates a new instance
public Component()
Properties
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
IsIndirectlyInstantiated
If true, the Component is defined at design-time, but at run-time (or execution-time) an object specified by the Component does not exist, that is, the Component is instantiated indirectly, through the instantiation of its realizing Classifiers or parts. <p>From package UML::StructuredClassifiers.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isIndirectlyInstantiated")]
[XmlAttribute(true)]
public bool IsIndirectlyInstantiated { get; set; }
Property Value
PackagedElement
The set of PackageableElements that a Component owns. In the namespace of a Component, all model elements that are involved in or related to its definition may be owned or imported explicitly. These may include e.g., Classes, Interfaces, Components, Packages, UseCases, Dependencies (e.g., mappings), and Artifacts. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("packagedElement")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IPackageableElement> PackagedElement { get; }
Property Value
Realization
The set of Realizations owned by the Component. Realizations reference the Classifiers of which the Component is an abstraction; i.e., that realize its behavior. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("realization")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("abstraction")]
public IOrderedSetExpression<IComponentRealization> Realization { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Methods
CreateOwnedClass(string, bool)
Creates a(n) (abstract) class with the specified name as a packaged element of this component.
public IClass CreateOwnedClass(string name, bool isAbstract)
Parameters
name
stringThe name for the new class, or null.
isAbstract
boolWhether the new class should be abstract.
Returns
CreateOwnedEnumeration(string)
Creates a enumeration with the specified name as a packaged element of this component.
public IEnumeration CreateOwnedEnumeration(string name)
Parameters
name
stringThe name for the new enumeration, or null.
Returns
CreateOwnedInterface(string)
Creates an interface with the specified name as a packaged element of this component.
public IInterface CreateOwnedInterface(string name)
Parameters
name
stringThe name for the new interface, or null.
Returns
CreateOwnedPrimitiveType(string)
Creates a primitive type with the specified name as a packaged element of this component.
public IPrimitiveType CreateOwnedPrimitiveType(string name)
Parameters
name
stringThe name for the new primitive type, or null.
Returns
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
Returns
- object
The attribute value or null if it could not be found
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetCompositionName(object)
Gets the property name for the given container
protected override string GetCompositionName(object container)
Parameters
container
objectThe container object
Returns
- string
The name of the respective container reference
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe requested attribute in upper case
Returns
- INotifyExpression<object>
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
GetProvideds()
Derivation for Component::/provided result = (let ris : Set(Interface) = allRealizedInterfaces(), realizingClassifiers : Set(Classifier) = self.realization.realizingClassifier->union(self.allParents()->collect(realization.realizingClassifier))->asSet(), allRealizingClassifiers : Set(Classifier) = realizingClassifiers->union(realizingClassifiers.allParents())->asSet(), realizingClassifierInterfaces : Set(Interface) = allRealizingClassifiers->iterate(c; rci : Set(Interface) = Set{} | rci->union(c.allRealizedInterfaces())), ports : Set(Port) = self.ownedPort->union(allParents()->collect(ownedPort))->asSet(), providedByPorts : Set(Interface) = ports.provided->asSet() in ris->union(realizingClassifierInterfaces) ->union(providedByPorts)->asSet()) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IInterface> GetProvideds()
Returns
GetRelativePathForNonIdentifiedChild(IModelElement)
Gets the relative URI fragment for the given child model element
protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)
Parameters
element
IModelElementThe element that should be looked for
Returns
- string
A fragment of the relative URI
GetRequireds()
Derivation for Component::/required result = (let uis : Set(Interface) = allUsedInterfaces(), realizingClassifiers : Set(Classifier) = self.realization.realizingClassifier->union(self.allParents()->collect(realization.realizingClassifier))->asSet(), allRealizingClassifiers : Set(Classifier) = realizingClassifiers->union(realizingClassifiers.allParents())->asSet(), realizingClassifierInterfaces : Set(Interface) = allRealizingClassifiers->iterate(c; rci : Set(Interface) = Set{} | rci->union(c.allUsedInterfaces())), ports : Set(Port) = self.ownedPort->union(allParents()->collect(ownedPort))->asSet(), usedByPorts : Set(Interface) = ports.required->asSet() in uis->union(realizingClassifierInterfaces)->union(usedByPorts)->asSet() ) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IInterface> GetRequireds()
Returns
No_nested_classifiers(object, object)
A Component cannot nest Classifiers. nestedClassifier->isEmpty()
public bool No_nested_classifiers(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
No_packaged_elements(object, object)
A Component nested in a Class cannot have any packaged elements. nestingClass <> null implies packagedElement->isEmpty()
public bool No_packaged_elements(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)