Operation interface

An Operation is a BehavioralFeature of a Classifier that specifies the name, type, parameters, and constraints for invoking an associated Behavior. An Operation may invoke both the execution of method behaviors as well as other behavioral responses.

Inheritance Hierarchy

OperationBehavioralFeatureFeatureRedefinableElementNamedElementElement
OrderedElementElement

Attributes

NameTypeDescription
appliedStereotypesStereotype [0..*]Indicates which stereotypes from the selected profile (or profiles) are applied to the element. The selected profiles are the profiles that are applied to the containing package. Inherited from Element.
idstring Gets the unique ID of the element. Inherited from Element.
isAbstractboolean If true, then the BehavioralFeature does not have an implementation, and one must be supplied by a more specific Classifier. If false, the BehavioralFeature must have an implementation in the Classifier or one must be inherited. Inherited from BehavioralFeature.
isConstructorboolean Specifies if the operation is a class constructor. 
isDeprecatedboolean If true, using this element should be avoided, typically because it has been superseded. Inherited from NamedElement.
isLeafboolean Indicates whether it is possible to further redefine a RedefinableElement. If the value is true, then it is not possible to further redefine the RedefinableElement. Inherited from RedefinableElement.
isQueryboolean Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false). 
isStaticboolean Specifies whether this Feature characterizes individual instances classified by the Classifier (false) or the Classifier itself (true). Inherited from Feature.
lowerinteger [0..1]Gets the lower bound of the return parameter, if present. This information is derived from the return result for this Operation. 
namestring The name of the NamedElement. Inherited from NamedElement.
orderinteger [1..1]Gets or set the sort order of the element if it is part of a collection. The value is 0 for elements to which no particular ordering applies. Elements with a lower order come before elements with a higher order. Inherited from OrderedElement.
ownedCommentsComment [0..*]The Comments owned by this Element. Inherited from Element.
ownedParametersParameter [0..*]The parameters owned by this Operation. Inherited from BehavioralFeature.
ownerElement [0..1]Gets the element that owns this element. Inherited from Element.
taggedValuesTaggedValueSpecification [0..*]Contains 0 or more tagged values for the element. Inherited from Element.
upperUnlimitedNatural [0..1]The upper bound of the return parameter, if present. This information is derived from the return result for this Operation. 
visibilityVisibilityKind [0..1]Determines whether and how the NamedElement is visible outside its owning Namespace. Inherited from NamedElement.

Operations

NameReturnsDescription
getFirstCommentBody()

Operation.getFirstCommentBody

X

Gets the text contents of the first comment in the element's owned comments, or an empty string if the element has no comments.

Return value
Type: string [1..1]
The body string of the first comment. If the element has no comments, an empty string is returned.
string [1..1]Gets the text contents of the first comment in the element's owned comments, or an empty string if the element has no comments. Inherited from Element.
getInputParameters()

Operation.getInputParameters

X

Returns the ownedParameters with direction in and inout.

Return value
Type: Parameter [0..*]
Parameter [0..*]Returns the ownedParameters with direction in and inout. 
getLowerBound()

Operation.getLowerBound

X

The query lowerBound() returns the lower bound of the return parameter as an integer, which is the integerValue of lowerValue, if this is given, and 1 otherwise. This information is derived from the return result for this Operation.

Return value
Type: integer 
integer The query lowerBound() returns the lower bound of the return parameter as an integer, which is the integerValue of lowerValue, if this is given, and 1 otherwise. This information is derived from the return result for this Operation. 
getOutputParameters()

Operation.getOutputParameters

X

Returns the ownedParameters with direction out, inout, or return.

Return value
Type: Parameter [0..*]
Parameter [0..*]Returns the ownedParameters with direction out, inout, or return. 
getReturnParameter()

Operation.getReturnParameter

X

Gets the operation's return parameter, if it has one.

Return value
Type: Parameter [0..1]
Parameter [0..1]Gets the operation's return parameter, if it has one. 
getReturnType()

Operation.getReturnType

X

Gets the type of the operation's return parameter, if it has any.

Return value
Type: Type [0..1]
Type [0..1]Gets the type of the operation's return parameter, if it has any. 
getUpperBound()

Operation.getUpperBound

X

The query upperBound() returns the upper bound of the return parameter for a bounded multiplicity as an unlimited natural, which is the unlimitedNaturalValue of upperValue, if given, and 1, otherwise. This information is derived from the return result for this Operation.

Return value
Type: UnlimitedNatural 
UnlimitedNatural The query upperBound() returns the upper bound of the return parameter for a bounded multiplicity as an unlimited natural, which is the unlimitedNaturalValue of upperValue, if given, and 1, otherwise. This information is derived from the return result for this Operation. 
isMultivalued()

Operation.isMultivalued

X

The query isMultivalued() checks whether the return parameter has an upper bound greater than one.

Return value
Type: boolean 
boolean The query isMultivalued() checks whether the return parameter has an upper bound greater than one. 
isOptional()

Operation.isOptional

X

The query isOptional checks whether he return parameter has a lower bound of 0 (0..n).

Return value
Type: boolean 
boolean The query isOptional checks whether he return parameter has a lower bound of 0 (0..n). 
isOptionalAndSinglevalued()

Operation.isOptionalAndSinglevalued

X

The query isOptional checks whether he return parameter has a lower bound of 0 and an upper bound of 1 (0..1).

Return value
Type: boolean 
boolean The query isOptional checks whether he return parameter has a lower bound of 0 and an upper bound of 1 (0..1).