Class Parameter
A Parameter is a specification of an argument used to pass information into or out of an invocation of a BehavioralFeature. Parameters can be treated as ConnectableElements within Collaborations. <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#//Parameter")]
public class Parameter : ConnectableElement, IParameter, IMultiplicityElement, IConnectableElement, IParameterableElement, ITypedElement, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Parameter
- Implements
- Inherited Members
Constructors
Parameter()
Creates a new instance
public Parameter()
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
DefaultValue
Specifies a ValueSpecification that represents a value to be used when no argument is supplied for the Parameter. <p>From package UML::Classification.</p>
[Browsable(false)]
[XmlElementName("defaultValue")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification DefaultValue { get; set; }
Property Value
Direction
Indicates whether a parameter is being sent into or out of a behavioral element. <p>From package UML::Classification.</p>
[XmlElementName("direction")]
[XmlAttribute(true)]
public ParameterDirectionKind Direction { get; set; }
Property Value
Effect
Specifies the effect that executions of the owner of the Parameter have on objects passed in or out of the parameter. <p>From package UML::Classification.</p>
[XmlElementName("effect")]
[XmlAttribute(true)]
public ParameterEffectKind? Effect { get; set; }
Property Value
IsException
Tells whether an output parameter may emit a value to the exclusion of the other outputs. <p>From package UML::Classification.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isException")]
[XmlAttribute(true)]
public bool IsException { get; set; }
Property Value
IsOrdered
For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this MultiplicityElement are sequentially ordered. <p>From package UML::CommonStructure.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isOrdered")]
[XmlAttribute(true)]
public bool IsOrdered { get; set; }
Property Value
IsStream
Tells whether an input parameter may accept values while its behavior is executing, or whether an output parameter may post values while the behavior is executing. <p>From package UML::Classification.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isStream")]
[XmlAttribute(true)]
public bool IsStream { get; set; }
Property Value
IsUnique
For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this MultiplicityElement are unique. <p>From package UML::CommonStructure.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isUnique")]
[XmlAttribute(true)]
public bool IsUnique { get; set; }
Property Value
LowerValue
The specification of the lower bound for this multiplicity. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("lowerValue")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification LowerValue { get; set; }
Property Value
Operation
The Operation owning this parameter. <p>From package UML::Classification.</p>
[XmlElementName("operation")]
[XmlAttribute(true)]
public IOperation Operation { get; set; }
Property Value
ParameterSet
The ParameterSets containing the parameter. See ParameterSet. <p>From package UML::Classification.</p>
[XmlElementName("parameterSet")]
[XmlAttribute(true)]
[XmlOpposite("parameter")]
public ISetExpression<IParameterSet> ParameterSet { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
UpperValue
The specification of the upper bound for this multiplicity. <p>From package UML::CommonStructure.</p>
[Browsable(false)]
[XmlElementName("upperValue")]
[XmlAttribute(false)]
[Containment]
public IValueSpecification UpperValue { get; set; }
Property Value
Methods
CompatibleWith(IMultiplicityElement)
The operation compatibleWith takes another multiplicity as input. It returns true if the other multiplicity is wider than, or the same as, self. result = ((other.lowerBound() <= self.lowerBound()) and ((other.upperBound() = *) or (self.upperBound() <= other.upperBound()))) <p>From package UML::CommonStructure.</p>
public bool CompatibleWith(IMultiplicityElement other)
Parameters
other
IMultiplicityElement
Returns
Connector_end(object, object)
A Parameter may only be associated with a Connector end within the context of a Collaboration. end->notEmpty() implies collaboration->notEmpty()
public bool Connector_end(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
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
GetDefault()
Derivation for Parameter::/default result = (if self.type = String then defaultValue.stringValue() else null endif) <p>From package UML::Classification.</p>
public string GetDefault()
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
GetLower()
The derived lower attribute must equal the lowerBound. result = (lowerBound()) <p>From package UML::CommonStructure.</p>
public int GetLower()
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
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
GetUpper()
The derived upper attribute must equal the upperBound. result = (upperBound()) <p>From package UML::CommonStructure.</p>
public void GetUpper()
In_and_out(object, object)
Only in and inout Parameters may have a delete effect. Only out, inout, and return Parameters may have a create effect. (effect = ParameterEffectKind::delete implies (direction = ParameterDirectionKind::_'in' or direction = ParameterDirectionKind::inout)) and (effect = ParameterEffectKind::create implies (direction = ParameterDirectionKind::out or direction = ParameterDirectionKind::inout or direction = ParameterDirectionKind::return))
public bool In_and_out(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
IncludesMultiplicity(IMultiplicityElement)
The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity. self.upperBound()->notEmpty() and self.lowerBound()->notEmpty() and M.upperBound()->notEmpty() and M.lowerBound()->notEmpty() result = ((self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound())) <p>From package UML::CommonStructure.</p>
public bool IncludesMultiplicity(IMultiplicityElement m)
Parameters
Returns
Is(int, object)
The operation is determines if the upper and lower bound of the ranges are the ones given. result = (lowerbound = self.lowerBound() and upperbound = self.upperBound()) <p>From package UML::CommonStructure.</p>
public bool Is(int lowerbound, object upperbound)
Parameters
Returns
IsMultivalued()
The query isMultivalued() checks whether this multiplicity has an upper bound greater than one. upperBound()->notEmpty() result = (upperBound() > 1) <p>From package UML::CommonStructure.</p>
public bool IsMultivalued()
Returns
IsSetDefault()
public bool IsSetDefault()
Returns
LowerBound()
The query lowerBound() returns the lower bound of the multiplicity as an integer, which is the integerValue of lowerValue, if this is given, and 1 otherwise. result = (if (lowerValue=null or lowerValue.integerValue()=null) then 1 else lowerValue.integerValue() endif) <p>From package UML::CommonStructure.</p>
public int LowerBound()
Returns
Lower_ge_0(object, object)
The lower bound must be a non-negative integer literal. lowerBound() >= 0
public bool Lower_ge_0(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
Lower_is_integer(object, object)
If it is not empty, then lowerValue must have an Integer value. lowerValue <> null implies lowerValue.integerValue() <> null
public bool Lower_is_integer(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
Not_exception(object, object)
An input Parameter cannot be an exception. isException implies (direction <> ParameterDirectionKind::_'in' and direction <> ParameterDirectionKind::inout)
public bool Not_exception(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
Object_effect(object, object)
Parameters typed by DataTypes cannot have an effect. (type.oclIsKindOf(DataType)) implies (effect = null)
public bool Object_effect(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
Reentrant_behaviors(object, object)
Reentrant behaviors cannot have stream Parameters. (isStream and behavior <> null) implies not behavior.isReentrant
public bool Reentrant_behaviors(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
SetBooleanDefaultValue(bool)
Sets the default value for this parameter to the specified Boolean value.
public void SetBooleanDefaultValue(bool value)
Parameters
value
boolThe new default value.
SetDefault(string)
public void SetDefault(string newDefault)
Parameters
newDefault
string
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
SetIntegerDefaultValue(int)
Sets the default value for this parameter to the specified integer value.
public void SetIntegerDefaultValue(int value)
Parameters
value
intThe new default value.
SetLower(int)
public void SetLower(int newLower)
Parameters
newLower
int
SetNullDefaultValue()
Sets the default value for this parameter to the null value.
public void SetNullDefaultValue()
SetRealDefaultValue(double)
Sets the default value for this parameter to the specified real value.
public void SetRealDefaultValue(double value)
Parameters
value
doubleThe new default value.
SetStringDefaultValue(string)
Sets the default value for this parameter to the specified string value.
public void SetStringDefaultValue(string value)
Parameters
value
stringThe new default value.
SetUnlimitedNaturalDefaultValue(object)
Sets the default value for this parameter to the specified unlimited natural value.
public void SetUnlimitedNaturalDefaultValue(object value)
Parameters
value
objectThe new default value.
SetUpper(object)
public void SetUpper(object newUpper)
Parameters
newUpper
object
Stream_and_exception(object, object)
A Parameter cannot be a stream and exception at the same time. not (isException and isStream)
public bool Stream_and_exception(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
UnsetDefault()
public void UnsetDefault()
UpperBound()
The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural, which is the unlimitedNaturalValue of upperValue, if given, and 1, otherwise. result = (if (upperValue=null or upperValue.unlimitedValue()=null) then 1 else upperValue.unlimitedValue() endif) <p>From package UML::CommonStructure.</p>
public void UpperBound()
Upper_ge_lower(object, object)
The upper bound must be greater than or equal to the lower bound. upperBound() >= lowerBound()
public bool Upper_ge_lower(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
Upper_is_unlimitedNatural(object, object)
If it is not empty, then upperValue must have an UnlimitedNatural value. upperValue <> null implies upperValue.unlimitedValue() <> null
public bool Upper_is_unlimitedNatural(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
Value_specification_constant(object, object)
If a non-literal ValueSpecification is used for lowerValue or upperValue, then that specification must be a constant expression.
public bool Value_specification_constant(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
Value_specification_no_side_effects(object, object)
If a non-literal ValueSpecification is used for lowerValue or upperValue, then evaluating that specification must not have side effects.
public bool Value_specification_no_side_effects(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.