Class Behavior
Behavior is a specification of how its context BehavioredClassifier changes state over time. This specification may be either a definition of possible behavior execution or emergent behavior, or a selective illustration of an interesting subset of possible executions. The latter form is typically used for capturing examples, such as a trace of a particular execution. <p>From package UML::CommonBehavior.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Behavior")]
public abstract class Behavior : RedefinableElement, IBehavior, IClass, IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Behavior
- Implements
- Derived
- Inherited Members
Constructors
Behavior()
Creates a new instance
public Behavior()
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
ClassifierBehavior
A Behavior that specifies the behavior of the BehavioredClassifier itself. <p>From package UML::SimpleClassifiers.</p>
[Browsable(false)]
[XmlElementName("classifierBehavior")]
[XmlAttribute(false)]
[Containment]
public IBehavior ClassifierBehavior { get; set; }
Property Value
ElementImport
References the ElementImports owned by the Namespace. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("elementImport")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("importingNamespace")]
public IListExpression<IElementImport> ElementImport { get; }
Property Value
Generalization
The Generalization relationships for this Classifier. These Generalizations navigate to more general Classifiers in the generalization hierarchy. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("generalization")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("specific")]
public IOrderedSetExpression<IGeneralization> Generalization { get; }
Property Value
InterfaceRealization
The set of InterfaceRealizations owned by the BehavioredClassifier. Interface realizations reference the Interfaces of which the BehavioredClassifier is an implementation. <p>From package UML::SimpleClassifiers.</p>
[Browsable(false)]
[XmlElementName("interfaceRealization")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("implementingClassifier")]
public IOrderedSetExpression<IInterfaceRealization> InterfaceRealization { get; }
Property Value
IsAbstract
If true, the Classifier can only be instantiated by instantiating one of its specializations. An abstract Classifier is intended to be used by other Classifiers e.g., as the target of Associations or Generalizations. <p>From package UML::Classification.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isAbstract")]
[XmlAttribute(true)]
public bool IsAbstract { get; set; }
Property Value
IsActive
Determines whether an object specified by this Class is active or not. If true, then the owning Class is referred to as an active Class. If false, then such a Class is referred to as a passive Class. <p>From package UML::StructuredClassifiers.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isActive")]
[XmlAttribute(true)]
public bool IsActive { get; set; }
Property Value
IsFinalSpecialization
If true, the Classifier cannot be specialized. <p>From package UML::Classification.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isFinalSpecialization")]
[XmlAttribute(true)]
public bool IsFinalSpecialization { get; set; }
Property Value
IsReentrant
Tells whether the Behavior can be invoked while it is still executing from a previous invocation. <p>From package UML::CommonBehavior.</p>
[XmlElementName("isReentrant")]
[XmlAttribute(true)]
public bool? IsReentrant { get; set; }
Property Value
- bool?
NestedClassifier
The Classifiers owned by the Class that are not ownedBehaviors. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("nestedClassifier")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IClassifier> NestedClassifier { get; }
Property Value
OwnedConnector
The connectors owned by the StructuredClassifier. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("ownedConnector")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IConnector> OwnedConnector { get; }
Property Value
OwnedOperation
The Operations owned by the Class. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("ownedOperation")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("class")]
public IOrderedSetExpression<IOperation> OwnedOperation { get; }
Property Value
OwnedParameter
References a list of Parameters to the Behavior which describes the order and type of arguments that can be given when the Behavior is invoked and of the values which will be returned when the Behavior completes its execution. <p>From package UML::CommonBehavior.</p>
[Browsable(false)]
[XmlElementName("ownedParameter")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IParameter> OwnedParameter { get; }
Property Value
OwnedParameterSet
The ParameterSets owned by this Behavior. <p>From package UML::CommonBehavior.</p>
[Browsable(false)]
[XmlElementName("ownedParameterSet")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IParameterSet> OwnedParameterSet { get; }
Property Value
OwnedPort
The Ports owned by the EncapsulatedClassifier. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("ownedPort")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IPort> OwnedPort { get; }
Property Value
OwnedReception
The Receptions owned by the Class. <p>From package UML::StructuredClassifiers.</p>
[Browsable(false)]
[XmlElementName("ownedReception")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IReception> OwnedReception { get; }
Property Value
OwnedTemplateSignature
The optional TemplateSignature specifying the formal TemplateParameters for this TemplateableElement. If a TemplateableElement has a TemplateSignature, then it is a template. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("ownedTemplateSignature")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("template")]
public ITemplateSignature OwnedTemplateSignature { get; set; }
Property Value
OwnedUseCase
The UseCases owned by this classifier. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("ownedUseCase")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IUseCase> OwnedUseCase { 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
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
PackageImport
References the PackageImports owned by the Namespace. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("packageImport")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("importingNamespace")]
public IListExpression<IPackageImport> PackageImport { get; }
Property Value
Postcondition
An optional set of Constraints specifying what is fulfilled after the execution of the Behavior is completed, if its precondition was fulfilled before its invocation. <p>From package UML::CommonBehavior.</p>
[Browsable(false)]
[XmlElementName("postcondition")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IConstraint> Postcondition { get; }
Property Value
PowertypeExtent
The GeneralizationSet of which this Classifier is a power type. <p>From package UML::Classification.</p>
[XmlElementName("powertypeExtent")]
[XmlAttribute(true)]
[XmlOpposite("powertype")]
public ISetExpression<IGeneralizationSet> PowertypeExtent { get; }
Property Value
Precondition
An optional set of Constraints specifying what must be fulfilled before the Behavior is invoked. <p>From package UML::CommonBehavior.</p>
[Browsable(false)]
[XmlElementName("precondition")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IConstraint> Precondition { get; }
Property Value
RedefinedBehavior
References the Behavior that this Behavior redefines. A subtype of Behavior may redefine any other subtype of Behavior. If the Behavior implements a BehavioralFeature, it replaces the redefined Behavior. If the Behavior is a classifierBehavior, it extends the redefined Behavior. <p>From package UML::CommonBehavior.</p>
[XmlElementName("redefinedBehavior")]
[XmlAttribute(true)]
public ISetExpression<IBehavior> RedefinedBehavior { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Representation
A CollaborationUse which indicates the Collaboration that represents this Classifier. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("representation")]
[XmlAttribute(false)]
[Containment]
public ICollaborationUse Representation { get; set; }
Property Value
Specification
Designates a BehavioralFeature that the Behavior implements. The BehavioralFeature must be owned by the BehavioredClassifier that owns the Behavior or be inherited by it. The Parameters of the BehavioralFeature and the implementing Behavior must match. A Behavior does not need to have a specification, in which case it either is the classifierBehavior of a BehavioredClassifier or it can only be invoked by another Behavior of the Classifier. <p>From package UML::CommonBehavior.</p>
[XmlElementName("specification")]
[XmlAttribute(true)]
[XmlOpposite("method")]
public IBehavioralFeature Specification { get; set; }
Property Value
Substitution
The Substitutions owned by this Classifier. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("substitution")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("substitutingClassifier")]
public IOrderedSetExpression<ISubstitution> Substitution { get; }
Property Value
TemplateBinding
The optional TemplateBindings from this TemplateableElement to one or more templates. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("templateBinding")]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("boundElement")]
public IOrderedSetExpression<ITemplateBinding> TemplateBinding { get; }
Property Value
UseCase
The set of UseCases for which this Classifier is the subject. <p>From package UML::Classification.</p>
[XmlElementName("useCase")]
[XmlAttribute(true)]
[XmlOpposite("subject")]
public ISetExpression<IUseCase> UseCase { get; }
Property Value
Methods
AllAttributes()
The query allAttributes gives an ordered set of all owned and inherited attributes of the Classifier. All owned attributes appear before any inherited attributes, and the attributes inherited from any more specific parent Classifier appear before those of any more general parent Classifier. However, if the Classifier has multiple immediate parents, then the relative ordering of the sets of attributes from those parents is not defined. result = (attribute->asSequence()->union(parents()->asSequence().allAttributes())->select(p | member->includes(p))->asOrderedSet()) <p>From package UML::Classification.</p>
public IOrderedSetExpression<IProperty> AllAttributes()
Returns
AllFeatures()
The query allFeatures() gives all of the Features in the namespace of the Classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature. result = (member->select(oclIsKindOf(Feature))->collect(oclAsType(Feature))->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IFeature> AllFeatures()
Returns
AllParents()
The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier. result = (parents()->union(parents()->collect(allParents())->asSet())) <p>From package UML::Classification.</p>
public ISetExpression<IClassifier> AllParents()
Returns
AllRealizedInterfaces()
The Interfaces realized by this Classifier and all of its generalizations result = (directlyRealizedInterfaces()->union(self.allParents()->collect(directlyRealizedInterfaces()))->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IInterface> AllRealizedInterfaces()
Returns
AllRoles()
All features of type ConnectableElement, equivalent to all direct and inherited roles. result = (allFeatures()->select(oclIsKindOf(ConnectableElement))->collect(oclAsType(ConnectableElement))->asSet()) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IConnectableElement> AllRoles()
Returns
AllSlottableFeatures()
All StructuralFeatures related to the Classifier that may have Slots, including direct attributes, inherited attributes, private attributes in generalizations, and memberEnds of Associations, but excluding redefined StructuralFeatures. result = (member->select(oclIsKindOf(StructuralFeature))-> collect(oclAsType(StructuralFeature))-> union(self.inherit(self.allParents()->collect(p | p.attribute)->asSet())-> collect(oclAsType(StructuralFeature)))->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IStructuralFeature> AllSlottableFeatures()
Returns
AllUsedInterfaces()
The Interfaces used by this Classifier and all of its generalizations result = (directlyUsedInterfaces()->union(self.allParents()->collect(directlyUsedInterfaces()))->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IInterface> AllUsedInterfaces()
Returns
BehavioredClassifier(IElement)
The first BehavioredClassifier reached by following the chain of owner relationships from the Behavior, if any. if from.oclIsKindOf(BehavioredClassifier) then from.oclAsType(BehavioredClassifier) else if from.owner = null then null else self.behavioredClassifier(from.owner) endif endif <p>From package UML::CommonBehavior.</p>
public IBehavioredClassifier BehavioredClassifier(IElement from)
Parameters
from
IElement
Returns
Cannot_import_ownedMembers(object, object)
A Namespace cannot have an ElementImport to one of its ownedMembers. elementImport.importedElement.oclAsType(Element)->excludesAll(ownedMember)
public bool Cannot_import_ownedMembers(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
Cannot_import_self(object, object)
A Namespace cannot have a PackageImport to itself. packageImport.importedPackage.oclAsType(Namespace)->excludes(self)
public bool Cannot_import_self(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
Class_behavior(object, object)
If a behavior is classifier behavior, it does not have a specification. classifierBehavior->notEmpty() implies classifierBehavior.specification->isEmpty()
public bool Class_behavior(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
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
CreateElementImport(IPackageableElement, VisibilityKind)
Creates an import of the specified element into this namespace with the specified visibility.
public IElementImport CreateElementImport(IPackageableElement element, VisibilityKind visibility)
Parameters
element
IPackageableElementThe element to import.
visibility
VisibilityKindThe visibility for the new element import.
Returns
CreateOwnedAttribute(string, IType, int, object)
Creates a property with the specified name, type, lower bound, and upper bound as an owned attribute of this structured classifier.
public IProperty CreateOwnedAttribute(string name, IType type, int lower, object upper)
Parameters
name
stringThe name for the new attribute, or null.
type
ITypeThe type for the new attribute, or null.
lower
intThe lower bound for the new attribute.
upper
objectThe upper bound for the new attribute.
Returns
CreateOwnedOperation(string, IEnumerable<string>, IEnumerable<IType>, IType)
Creates an operation with the specified name, parameter names, parameter types, and return type (or null) as an owned operation of this class.
public IOperation CreateOwnedOperation(string name, IEnumerable<string> parameterNames, IEnumerable<IType> parameterTypes, IType returnType)
Parameters
name
stringThe name for the new operation, or null.
parameterNames
IEnumerable<string>The parameter names for the new operation, or null.
parameterTypes
IEnumerable<IType>The parameter types for the new operation, or null.
returnType
ITypeThe return type for the new operation, or null.
Returns
CreatePackageImport(IPackage, VisibilityKind)
Creates an import of the specified package into this namespace with the specified visibility.
public IPackageImport CreatePackageImport(IPackage package_, VisibilityKind visibility)
Parameters
package_
IPackageThe package to import.
visibility
VisibilityKindThe visibility for the new package import.
Returns
DirectlyRealizedInterfaces()
The Interfaces directly realized by this Classifier result = ((clientDependency-> select(oclIsKindOf(Realization) and supplier->forAll(oclIsKindOf(Interface))))-> collect(supplier.oclAsType(Interface))->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IInterface> DirectlyRealizedInterfaces()
Returns
DirectlyUsedInterfaces()
The Interfaces directly used by this Classifier result = ((supplierDependency-> select(oclIsKindOf(Usage) and client->forAll(oclIsKindOf(Interface))))-> collect(client.oclAsType(Interface))->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IInterface> DirectlyUsedInterfaces()
Returns
ExcludeCollisions(IEnumerable<IPackageableElement>)
The query excludeCollisions() excludes from a set of PackageableElements any that would not be distinguishable from each other in this Namespace. result = (imps->reject(imp1 | imps->exists(imp2 | not imp1.isDistinguishableFrom(imp2, self)))) <p>From package UML::CommonStructure.</p>
public ISetExpression<IPackageableElement> ExcludeCollisions(IEnumerable<IPackageableElement> imps)
Parameters
Returns
Feature_of_context_classifier(object, object)
The specification BehavioralFeature must be a feature (possibly inherited) of the context BehavioredClassifier of the Behavior. _'context'.feature->includes(specification)
public bool Feature_of_context_classifier(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
GetAllAttributes()
Retrieves all the attributes of this classifier, including those inherited from its parents.
public ISetExpression<IProperty> GetAllAttributes()
Returns
GetAllImplementedInterfaces()
Retrieves all the interfaces on which this behaviored classifier or any of its parents has an interface realization dependency.
public ISetExpression<IInterface> GetAllImplementedInterfaces()
Returns
GetAllOperations()
Retrieves all the operations of this classifier, including those inherited from its parents.
public ISetExpression<IOperation> GetAllOperations()
Returns
GetAllUsedInterfaces()
Retrieves all the interfaces on which this classifier or any of its parents has a usage dependency.
public ISetExpression<IInterface> GetAllUsedInterfaces()
Returns
GetAssociations()
Retrieves the associations in which this type is involved.
public ISetExpression<IAssociation> GetAssociations()
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
GetContext()
A Behavior that is directly owned as a nestedClassifier does not have a context. Otherwise, to determine the context of a Behavior, find the first BehavioredClassifier reached by following the chain of owner relationships from the Behavior, if any. If there is such a BehavioredClassifier, then it is the context, unless it is itself a Behavior with a non-empty context, in which case that is also the context for the original Behavior. result = (if nestingClass <> null then null else let b:BehavioredClassifier = self.behavioredClassifier(self.owner) in if b.oclIsKindOf(Behavior) and b.oclAsType(Behavior).'context' <> null then b.oclAsType(Behavior).'context' else b endif endif ) <p>From package UML::CommonBehavior.</p>
public IBehavioredClassifier GetContext()
Returns
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
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
GetExtensions()
Derivation for Class::/extension : Extension result = (Extension.allInstances()->select(ext | let endTypes : Sequence(Classifier) = ext.memberEnd->collect(type.oclAsType(Classifier)) in endTypes->includes(self) or endTypes.allParents()->includes(self) )) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IExtension> GetExtensions()
Returns
GetGenerals()
The general Classifiers are the ones referenced by the Generalization relationships. result = (parents()) <p>From package UML::Classification.</p>
public ISetExpression<IClassifier> GetGenerals()
Returns
GetImplementedInterfaces()
Retrieves the interfaces on which this behaviored classifier has an interface realization dependency.
public ISetExpression<IInterface> GetImplementedInterfaces()
Returns
GetImportedElements()
Retrieves the elements imported by this namespace.
public ISetExpression<IPackageableElement> GetImportedElements()
Returns
GetImportedMembers()
The importedMember property is derived as the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports. result = (self.importMembers(elementImport.importedElement->asSet()->union(packageImport.importedPackage->collect(p | p.visibleMembers()))->asSet())) <p>From package UML::CommonStructure.</p>
public ISetExpression<IPackageableElement> GetImportedMembers()
Returns
GetImportedPackages()
Retrieves the packages imported by this namespace.
public ISetExpression<IPackage> GetImportedPackages()
Returns
GetInheritedMembers()
The inheritedMember association is derived by inheriting the inheritable members of the parents. result = (inherit(parents()->collect(inheritableMembers(self))->asSet())) <p>From package UML::Classification.</p>
public ISetExpression<INamedElement> GetInheritedMembers()
Returns
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
GetNamesOfMember(INamedElement)
The query getNamesOfMember() gives a set of all of the names that a member would have in a Namespace, taking importing into account. In general a member can have multiple names in a Namespace if it is imported more than once with different aliases. result = (if self.ownedMember ->includes(element) then Set{element.name} else let elementImports : Set(ElementImport) = self.elementImport->select(ei | ei.importedElement = element) in if elementImports->notEmpty() then elementImports->collect(el | el.getName())->asSet() else self.packageImport->select(pi | pi.importedPackage.visibleMembers().oclAsType(NamedElement)->includes(element))-> collect(pi | pi.importedPackage.getNamesOfMember(element))->asSet() endif endif) <p>From package UML::CommonStructure.</p>
public ISetExpression<string> GetNamesOfMember(INamedElement element)
Parameters
element
INamedElement
Returns
GetOperation(string, IEnumerable<string>, IEnumerable<IType>)
Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier.
public IOperation GetOperation(string name, IEnumerable<string> parameterNames, IEnumerable<IType> parameterTypes)
Parameters
name
stringThe name of the operation to retrieve, or null.
parameterNames
IEnumerable<string>The parameter names of the operation to retrieve, or null.
parameterTypes
IEnumerable<IType>The parameter types of the operation to retrieve, or null.
Returns
GetOperation(string, IEnumerable<string>, IEnumerable<IType>, bool)
Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier, ignoring case if indicated.
public IOperation GetOperation(string name, IEnumerable<string> parameterNames, IEnumerable<IType> parameterTypes, bool ignoreCase)
Parameters
name
stringThe name of the operation to retrieve, or null.
parameterNames
IEnumerable<string>The parameter names of the operation to retrieve, or null.
parameterTypes
IEnumerable<IType>The parameter types of the operation to retrieve, or null.
ignoreCase
boolWhether to ignore case in String comparisons.
Returns
GetOperations()
Retrieves the operations of this classifier.
public ISetExpression<IOperation> GetOperations()
Returns
GetOwnedMembers()
public ISetExpression<INamedElement> GetOwnedMembers()
Returns
GetOwnedPorts()
Derivation for EncapsulatedClassifier::/ownedPort : Port result = (ownedAttribute->select(oclIsKindOf(Port))->collect(oclAsType(Port))->asOrderedSet()) <p>From package UML::StructuredClassifiers.</p>
public IOrderedSetExpression<IPort> GetOwnedPorts()
Returns
GetParts()
Derivation for StructuredClassifier::/part result = (ownedAttribute->select(isComposite)->asSet()) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IProperty> GetParts()
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
GetSuperClasses()
Derivation for Class::/superClass : Class result = (self.general()->select(oclIsKindOf(Class))->collect(oclAsType(Class))->asSet()) <p>From package UML::StructuredClassifiers.</p>
public ISetExpression<IClass> GetSuperClasses()
Returns
GetUsedInterfaces()
Retrieves the interfaces on which this classifier has a usage dependency.
public ISetExpression<IInterface> GetUsedInterfaces()
Returns
HasVisibilityOf(INamedElement)
The query hasVisibilityOf() determines whether a NamedElement is visible in the classifier. Non-private members are visible. It is only called when the argument is something owned by a parent. allParents()->including(self)->collect(member)->includes(n) result = (n.visibility <> VisibilityKind::private) <p>From package UML::Classification.</p>
public bool HasVisibilityOf(INamedElement n)
Parameters
Returns
ImportMembers(IEnumerable<IPackageableElement>)
The query importMembers() defines which of a set of PackageableElements are actually imported into the Namespace. This excludes hidden ones, i.e., those which have names that conflict with names of ownedMembers, and it also excludes PackageableElements that would have the indistinguishable names when imported. result = (self.excludeCollisions(imps)->select(imp | self.ownedMember->forAll(mem | imp.isDistinguishableFrom(mem, self)))) <p>From package UML::CommonStructure.</p>
public ISetExpression<IPackageableElement> ImportMembers(IEnumerable<IPackageableElement> imps)
Parameters
Returns
Inherit(IEnumerable<INamedElement>)
The query inherit() defines how to inherit a set of elements passed as its argument. It excludes redefined elements from the result. result = (inhs->reject(inh | inh.oclIsKindOf(RedefinableElement) and ownedMember->select(oclIsKindOf(RedefinableElement))-> select(redefinedElement->includes(inh.oclAsType(RedefinableElement))) ->notEmpty())) <p>From package UML::Classification.</p>
public ISetExpression<INamedElement> Inherit(IEnumerable<INamedElement> inhs)
Parameters
inhs
IEnumerable<INamedElement>
Returns
InheritableMembers(IClassifier)
The query inheritableMembers() gives all of the members of a Classifier that may be inherited in one of its descendants, subject to whatever visibility restrictions apply. c.allParents()->includes(self) result = (member->select(m | c.hasVisibilityOf(m))) <p>From package UML::Classification.</p>
public ISetExpression<INamedElement> InheritableMembers(IClassifier c)
Parameters
Returns
InputParameters()
The in and inout ownedParameters of the Behavior. result = (ownedParameter->select(direction=ParameterDirectionKind::_'in' or direction=ParameterDirectionKind::inout)) <p>From package UML::CommonBehavior.</p>
public IOrderedSetExpression<IParameter> InputParameters()
Returns
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
IsMetaclass()
Determines whether this class is a metaclass.
public bool IsMetaclass()
Returns
IsSubstitutableFor(IClassifier)
result = (substitution.contract->includes(contract)) <p>From package UML::Classification.</p>
public bool IsSubstitutableFor(IClassifier contract)
Parameters
contract
IClassifier
Returns
IsTemplate()
The query isTemplate() returns whether this TemplateableElement is actually a template. result = (ownedTemplateSignature <> null) <p>From package UML::CommonStructure.</p>
public bool IsTemplate()
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
Maps_to_generalization_set(object, object)
The Classifier that maps to a GeneralizationSet may neither be a specific nor a general Classifier in any of the Generalization relationships defined for that GeneralizationSet. In other words, a power type may not be an instance of itself nor may its instances also be its subclasses. powertypeExtent->forAll( gs | gs.generalization->forAll( gen | not (gen.general = self) and not gen.general.allParents()->includes(self) and not (gen.specific = self) and not self.allParents()->includes(gen.specific) ))
public bool Maps_to_generalization_set(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
MaySpecializeType(IClassifier)
The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type. By default a classifier may specialize classifiers of the same or a more general type. It is intended to be redefined by classifiers that have different specialization constraints. result = (self.oclIsKindOf(c.oclType())) <p>From package UML::Classification.</p>
public bool MaySpecializeType(IClassifier c)
Parameters
Returns
MembersAreDistinguishable()
The Boolean query membersAreDistinguishable() determines whether all of the Namespace's members are distinguishable within it. result = (member->forAll( memb | member->excluding(memb)->forAll(other | memb.isDistinguishableFrom(other, self)))) <p>From package UML::CommonStructure.</p>
public bool MembersAreDistinguishable()
Returns
Members_distinguishable(object, object)
All the members of a Namespace are distinguishable within it. membersAreDistinguishable()
public bool Members_distinguishable(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
Most_one_behavior(object, object)
There may be at most one Behavior for a given pairing of BehavioredClassifier (as owner of the Behavior) and BehavioralFeature (as specification of the Behavior). specification <> null implies _'context'.ownedBehavior->select(specification=self.specification)->size() = 1
public bool Most_one_behavior(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
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
No_cycles_in_generalization(object, object)
Generalization hierarchies must be directed and acyclical. A Classifier can not be both a transitively general and transitively specific Classifier of the same Classifier. not allParents()->includes(self)
public bool No_cycles_in_generalization(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
Non_final_parents(object, object)
The parents of a Classifier must be non-final. parents()->forAll(not isFinalSpecialization)
public bool Non_final_parents(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
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
OutputParameters()
The out, inout and return ownedParameters. result = (ownedParameter->select(direction=ParameterDirectionKind::out or direction=ParameterDirectionKind::inout or direction=ParameterDirectionKind::return)) <p>From package UML::CommonBehavior.</p>
public IOrderedSetExpression<IParameter> OutputParameters()
Returns
ParameterableElements()
The query parameterableElements() returns the set of ParameterableElements that may be used as the parameteredElements for a TemplateParameter of this TemplateableElement. By default, this set includes all the ownedElements. Subclasses may override this operation if they choose to restrict the set of ParameterableElements. result = (self.allOwnedElements()->select(oclIsKindOf(ParameterableElement)).oclAsType(ParameterableElement)->asSet()) <p>From package UML::CommonStructure.</p>
public ISetExpression<IParameterableElement> ParameterableElements()
Returns
Parameters_match(object, object)
If a Behavior has a specification BehavioralFeature, then it must have the same number of ownedParameters as its specification. The Behavior Parameters must also "match" the BehavioralParameter Parameters, but the exact requirements for this matching are not formalized. specification <> null implies ownedParameter->size() = specification.ownedParameter->size()
public bool Parameters_match(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
Parents()
The query parents() gives all of the immediate ancestors of a generalized Classifier. result = (generalization.general->asSet()) <p>From package UML::Classification.</p>
public ISetExpression<IClassifier> Parents()
Returns
Passive_class(object, object)
Only an active Class may own Receptions and have a classifierBehavior. not isActive implies (ownedReception->isEmpty() and classifierBehavior = null)
public bool Passive_class(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
Specialize_type(object, object)
A Classifier may only specialize Classifiers of a valid type. parents()->forAll(c | self.maySpecializeType(c))
public bool Specialize_type(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.