Class InstanceSpecification
An InstanceSpecification is a model element that represents an instance in a modeled system. An InstanceSpecification can act as a DeploymentTarget in a Deployment relationship, in the case that it represents an instance of a Node. It can also act as a DeployedArtifact, if it represents an instance of an Artifact. <p>From package UML::Classification.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//InstanceSpecification")]
public class InstanceSpecification : DeploymentTarget, IInstanceSpecification, IDeployedArtifact, IPackageableElement, IParameterableElement, IDeploymentTarget, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
InstanceSpecification
- Implements
- Derived
- Inherited Members
Constructors
InstanceSpecification()
Creates a new instance
public InstanceSpecification()
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
Classifier
The Classifier or Classifiers of the represented instance. If multiple Classifiers are specified, the instance is classified by all of them. <p>From package UML::Classification.</p>
[XmlElementName("classifier")]
[XmlAttribute(true)]
public ISetExpression<IClassifier> Classifier { get; }
Property Value
OwningTemplateParameter
The formal TemplateParameter that owns this ParameterableElement. <p>From package UML::CommonStructure.</p>
[XmlElementName("owningTemplateParameter")]
[XmlAttribute(true)]
[XmlOpposite("ownedParameteredElement")]
public ITemplateParameter OwningTemplateParameter { get; set; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Slot
A Slot giving the value or values of a StructuralFeature of the instance. An InstanceSpecification can have one Slot per StructuralFeature of its Classifiers, including inherited features. It is not necessary to model a Slot for every StructuralFeature, in which case the InstanceSpecification is a partial description. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("slot")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("owningInstance")]
public IOrderedSetExpression<ISlot> Slot { get; }
Property Value
Specification
A specification of how to compute, derive, or construct the instance. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("specification")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification Specification { get; set; }
Property Value
TemplateParameter
The TemplateParameter that exposes this ParameterableElement as a formal parameter. <p>From package UML::CommonStructure.</p>
[XmlElementName("templateParameter")]
[XmlAttribute(true)]
[XmlOpposite("parameteredElement")]
public ITemplateParameter TemplateParameter { get; set; }
Property Value
Methods
Defining_feature(object, object)
The definingFeature of each slot is a StructuralFeature related to a classifier of the InstanceSpecification, including direct attributes, inherited attributes, private attributes in generalizations, and memberEnds of Associations, but excluding redefined StructuralFeatures. slot->forAll(s | classifier->exists (c | c.allSlottableFeatures()->includes (s.definingFeature)))
public bool Defining_feature(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
Deployment_artifact(object, object)
An InstanceSpecification can act as a DeployedArtifact if it represents an instance of an Artifact. deploymentForArtifact->notEmpty() implies classifier->exists(oclIsKindOf(Artifact))
public bool Deployment_artifact(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
Deployment_target(object, object)
An InstanceSpecification can act as a DeploymentTarget if it represents an instance of a Node and functions as a part in the internal structure of an encompassing Node. deployment->notEmpty() implies classifier->exists(node | node.oclIsKindOf(Node) and Node.allInstances()->exists(n | n.part->exists(p | p.type = node)))
public bool Deployment_target(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
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
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
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
IsCompatibleWith(IParameterableElement)
The query isCompatibleWith() determines if this ParameterableElement is compatible with the specified ParameterableElement. By default, this ParameterableElement is compatible with another ParameterableElement p if the kind of this ParameterableElement is the same as or a subtype of the kind of p. Subclasses of ParameterableElement should override this operation to specify different compatibility constraints. result = (self.oclIsKindOf(p.oclType())) <p>From package UML::CommonStructure.</p>
public bool IsCompatibleWith(IParameterableElement p)
Parameters
Returns
IsTemplateParameter()
The query isTemplateParameter() determines if this ParameterableElement is exposed as a formal TemplateParameter. result = (templateParameter->notEmpty()) <p>From package UML::CommonStructure.</p>
public bool IsTemplateParameter()
Returns
Namespace_needs_visibility(object, object)
A PackageableElement owned by a Namespace must have a visibility. visibility = null implies namespace = null
public bool Namespace_needs_visibility(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)
Parameters
Structural_feature(object, object)
No more than one slot in an InstanceSpecification may have the same definingFeature. classifier->forAll(c | (c.allSlottableFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1)))
public bool Structural_feature(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.