Table of Contents

Interface IBehavior

Namespace
NMF.Interop.Uml
Assembly
NMF.UMLInterop.dll

The public interface for Behavior

[DefaultImplementationType(typeof(Behavior))]
[XmlDefaultImplementationType(typeof(Behavior))]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Behavior")]
public interface IBehavior : IClass, IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inherited Members

Properties

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)]
bool? IsReentrant { get; set; }

Property Value

bool?

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]
IOrderedSetExpression<IParameter> OwnedParameter { get; }

Property Value

IOrderedSetExpression<IParameter>

OwnedParameterSet

The ParameterSets owned by this Behavior. <p>From package UML::CommonBehavior.</p>

[Browsable(false)]
[XmlElementName("ownedParameterSet")]
[XmlAttribute(false)]
[Containment]
IOrderedSetExpression<IParameterSet> OwnedParameterSet { get; }

Property Value

IOrderedSetExpression<IParameterSet>

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]
IOrderedSetExpression<IConstraint> Postcondition { get; }

Property Value

IOrderedSetExpression<IConstraint>

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]
IOrderedSetExpression<IConstraint> Precondition { get; }

Property Value

IOrderedSetExpression<IConstraint>

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)]
ISetExpression<IBehavior> RedefinedBehavior { get; }

Property Value

ISetExpression<IBehavior>

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")]
IBehavioralFeature Specification { get; set; }

Property Value

IBehavioralFeature

Methods

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>

IBehavioredClassifier BehavioredClassifier(IElement from)

Parameters

from IElement

Returns

IBehavioredClassifier

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)

bool Feature_of_context_classifier(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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>

IBehavioredClassifier GetContext()

Returns

IBehavioredClassifier

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>

IOrderedSetExpression<IParameter> InputParameters()

Returns

IOrderedSetExpression<IParameter>

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

bool Most_one_behavior(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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>

IOrderedSetExpression<IParameter> OutputParameters()

Returns

IOrderedSetExpression<IParameter>

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()

bool Parameters_match(object diagnostics, object context)

Parameters

diagnostics object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool