org.eclipse.uml2
Interface Operation

All Superinterfaces:
BehavioralFeature, Element, EModelElement, EObject, Feature, MultiplicityElement, NamedElement, Namespace, Notifier, ParameterableElement, RedefinableElement, TemplateableElement, TypedElement

public interface Operation
extends BehavioralFeature, TypedElement, MultiplicityElement, ParameterableElement

A representation of the model object 'Operation'. An operation is a behavioral feature of a classifier that specifies the name, type, parameters, and constraints for invoking an associated behavior.

The following features are supported:

See Also:
UML2Package.getOperation()

Field Summary
static java.lang.String copyright
           
 
Fields inherited from interface org.eclipse.uml2.NamedElement
SEPARATOR
 
Fields inherited from interface org.eclipse.uml2.MultiplicityElement
UNLIMITED_UPPER_BOUND
 
Method Summary
 Parameter createOwnedParameter()
          Creates a Parameter and appends it to the 'Owned Parameter' containment reference list
 Parameter createOwnedParameter(EClass eClass)
          Deprecated. Use #createOwnedParameter() instead.
 Constraint getBodyCondition()
          Returns the value of the 'Body Condition' reference
 Class getClass_()
          Returns the value of the 'Class ' container reference.
 DataType getDatatype()
          Returns the value of the 'Datatype' container reference.
 Parameter getOwnedParameter(java.lang.String name)
          Retrieves the Parameter with the specified 'Name' from the 'Owned Parameter' containment reference list
 EList getOwnedParameters()
          Returns the value of the 'Owned Parameter' containment reference list.
 Constraint getPostcondition(java.lang.String name)
          Retrieves the Constraint with the specified 'Name' from the 'Postcondition' reference list
 EList getPostconditions()
          Returns the value of the 'Postcondition' reference list.
 Constraint getPrecondition(java.lang.String name)
          Retrieves the Constraint with the specified 'Name' from the 'Precondition' reference list
 EList getPreconditions()
          Returns the value of the 'Precondition' reference list.
 Operation getRedefinedOperation(java.lang.String name)
          Retrieves the Operation with the specified 'Name' from the 'Redefined Operation' reference list
 EList getRedefinedOperations()
          Returns the value of the 'Redefined Operation' reference list.
 boolean isOrdered()
           A query based on the following OCL expression: if returnResult->size() = 1 then returnResult->any().isOrdered else false endif
 boolean isQuery()
          Returns the value of the 'Is Query' attribute.
 boolean isUnique()
           A query based on the following OCL expression: if returnResult->size() = 1 then returnResult->any().isUnique else true endif
 void setBodyCondition(Constraint value)
          Sets the value of the 'Body Condition' reference
 void setClass_(Class value)
          Sets the value of the 'Class ' container reference
 void setDatatype(DataType value)
          Sets the value of the 'Datatype' container reference
 void setIsQuery(boolean value)
          Sets the value of the 'Is Query' attribute
 Classifier type()
           A query based on the following OCL expression: if returnResult->size() = 1 then returnResult->any().type else Set{} endif
 boolean validateOnlyBodyForQuery(DiagnosticChain diagnostics, java.util.Map context)
           An invariant constraint based on the following OCL expression: bodyCondition->notEmpty() implies isQuery
 boolean validateTypeOfResult(DiagnosticChain diagnostics, java.util.Map context)
           An invariant constraint based on the following OCL expression: if returnResult->size() = 1 then type = returnResult.type else type = nil endif
 
Methods inherited from interface org.eclipse.uml2.BehavioralFeature
createFormalParameter, createFormalParameter, createReturnResult, createReturnResult, getConcurrency, getFormalParameter, getFormalParameters, getMethod, getMethods, getParameter, getParameters, getRaisedException, getRaisedExceptions, getReturnResult, getReturnResults, isAbstract, setConcurrency, setIsAbstract
 
Methods inherited from interface org.eclipse.uml2.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImports, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRules, getPackageImports, importedMember, importElement, importMembers, importPackage, membersAreDistinguishable, validateImportedMemberDerived, validateMembersAreDistinguishable
 
Methods inherited from interface org.eclipse.uml2.NamedElement
allNamespaces, createDependency, createNameExpression, createNameExpression, getClientDependencies, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, setVisibility, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature
 
Methods inherited from interface org.eclipse.uml2.Element
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getValue, hasKeyword, hasValue, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.Feature
getFeaturingClassifier, getFeaturingClassifiers, isStatic, setIsStatic
 
Methods inherited from interface org.eclipse.uml2.RedefinableElement
getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.TypedElement
getType, setType
 
Methods inherited from interface org.eclipse.uml2.MultiplicityElement
createLowerValue, createUpperValue, getLower, getLowerValue, getUpper, getUpperValue, includesCardinality, includesMultiplicity, isMultivalued, lower, lowerBound, setIsOrdered, setIsUnique, setLowerBound, setLowerValue, setUpperBound, setUpperValue, upper, upperBound, validateLowerEqLowerbound, validateLowerGe0, validateUpperEqUpperbound, validateUpperGeLower, validateUpperGt0
 
Methods inherited from interface org.eclipse.uml2.ParameterableElement
getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values
Method Detail

isQuery

public boolean isQuery()
Returns the value of the 'Is Query' attribute. The default value is "false".

If the meaning of the 'Is Query' attribute isn't clear, there really should be more of a description here...

Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false). The default value is false.

Returns:
the value of the 'Is Query' attribute.
See Also:
setIsQuery(boolean), UML2Package.getOperation_IsQuery()

setIsQuery

public void setIsQuery(boolean value)
Sets the value of the 'Is Query' attribute.

Parameters:
value - the new value of the 'Is Query' attribute.
See Also:
isQuery()

getOwnedParameters

public EList getOwnedParameters()
Returns the value of the 'Owned Parameter' containment reference list. The list contents are of type Parameter. It is bidirectional and its opposite is 'Operation'.

If the meaning of the 'Owned Parameter' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Owned Parameter' containment reference list.
See Also:
UML2Package.getOperation_OwnedParameter(), Parameter.getOperation()

getOwnedParameter

public Parameter getOwnedParameter(java.lang.String name)
Retrieves the Parameter with the specified 'Name' from the 'Owned Parameter' containment reference list.

Parameters:
name - The 'Name' of the Parameter to retrieve.
Returns:
The Parameter with the specified 'Name', or null.
See Also:
getOwnedParameters()

createOwnedParameter

public Parameter createOwnedParameter(EClass eClass)
Deprecated. Use #createOwnedParameter() instead.

Creates a Parameter and appends it to the 'Owned Parameter' containment reference list.

Parameters:
eClass - The Ecore class of the Parameter to create.
Returns:
The new Parameter.
See Also:
getOwnedParameters()

createOwnedParameter

public Parameter createOwnedParameter()
Creates a Parameter and appends it to the 'Owned Parameter' containment reference list.

Returns:
The new Parameter.
See Also:
getOwnedParameters()

getClass_

public Class getClass_()
Returns the value of the 'Class ' container reference. It is bidirectional and its opposite is 'Owned Operation'.

If the meaning of the 'Class ' container reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Class ' container reference.
See Also:
setClass_(org.eclipse.uml2.Class), UML2Package.getOperation_Class_(), Class.getOwnedOperations()

setClass_

public void setClass_(Class value)
Sets the value of the 'Class ' container reference.

Parameters:
value - the new value of the 'Class ' container reference.
See Also:
getClass_()

getDatatype

public DataType getDatatype()
Returns the value of the 'Datatype' container reference. It is bidirectional and its opposite is 'Owned Operation'.

If the meaning of the 'Datatype' container reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Datatype' container reference.
See Also:
setDatatype(DataType), UML2Package.getOperation_Datatype(), DataType.getOwnedOperations()

setDatatype

public void setDatatype(DataType value)
Sets the value of the 'Datatype' container reference.

Parameters:
value - the new value of the 'Datatype' container reference.
See Also:
getDatatype()

getPreconditions

public EList getPreconditions()
Returns the value of the 'Precondition' reference list. The list contents are of type Constraint.

If the meaning of the 'Precondition' containment reference list isn't clear, there really should be more of a description here...

An optional set of Constraints on the state of the system when the Operation is invoked. Subsets Namespace::ownedMember.

Returns:
the value of the 'Precondition' reference list.
See Also:
UML2Package.getOperation_Precondition()

getPrecondition

public Constraint getPrecondition(java.lang.String name)
Retrieves the Constraint with the specified 'Name' from the 'Precondition' reference list.

Parameters:
name - The 'Name' of the Constraint to retrieve.
Returns:
The Constraint with the specified 'Name', or null.
See Also:
getPreconditions()

getPostconditions

public EList getPostconditions()
Returns the value of the 'Postcondition' reference list. The list contents are of type Constraint.

If the meaning of the 'Postcondition' containment reference list isn't clear, there really should be more of a description here...

An optional set of Constraints specifying the state of the system when the Operation is completed. Subsets Namespace::ownedMember.

Returns:
the value of the 'Postcondition' reference list.
See Also:
UML2Package.getOperation_Postcondition()

getPostcondition

public Constraint getPostcondition(java.lang.String name)
Retrieves the Constraint with the specified 'Name' from the 'Postcondition' reference list.

Parameters:
name - The 'Name' of the Constraint to retrieve.
Returns:
The Constraint with the specified 'Name', or null.
See Also:
getPostconditions()

getRedefinedOperations

public EList getRedefinedOperations()
Returns the value of the 'Redefined Operation' reference list. The list contents are of type Operation.

If the meaning of the 'Redefined Operation' reference list isn't clear, there really should be more of a description here...

the Operations that are redefined by this Operation. Subsets RedefinableElement. redefinedElement.

Returns:
the value of the 'Redefined Operation' reference list.
See Also:
UML2Package.getOperation_RedefinedOperation()

getRedefinedOperation

public Operation getRedefinedOperation(java.lang.String name)
Retrieves the Operation with the specified 'Name' from the 'Redefined Operation' reference list.

Parameters:
name - The 'Name' of the Operation to retrieve.
Returns:
The Operation with the specified 'Name', or null.
See Also:
getRedefinedOperations()

getBodyCondition

public Constraint getBodyCondition()
Returns the value of the 'Body Condition' reference.

If the meaning of the 'Body Condition' containment reference isn't clear, there really should be more of a description here...

optional Constraint on the result values of an invocation of this Operation. Subsets Namespace::ownedMember.

Returns:
the value of the 'Body Condition' reference.
See Also:
setBodyCondition(Constraint), UML2Package.getOperation_BodyCondition()

setBodyCondition

public void setBodyCondition(Constraint value)
Sets the value of the 'Body Condition' reference.

Parameters:
value - the new value of the 'Body Condition' reference.
See Also:
getBodyCondition()

validateTypeOfResult

public boolean validateTypeOfResult(DiagnosticChain diagnostics,
                                    java.util.Map context)
An invariant constraint based on the following OCL expression: if returnResult->size() = 1 then type = returnResult.type else type = nil endif


isOrdered

public boolean isOrdered()
A query based on the following OCL expression: if returnResult->size() = 1 then returnResult->any().isOrdered else false endif

Specified by:
isOrdered in interface MultiplicityElement
Returns:
the value of the 'Is Ordered' attribute.
See Also:
MultiplicityElement.setIsOrdered(boolean), UML2Package.getMultiplicityElement_IsOrdered()

isUnique

public boolean isUnique()
A query based on the following OCL expression: if returnResult->size() = 1 then returnResult->any().isUnique else true endif

Specified by:
isUnique in interface MultiplicityElement
Returns:
the value of the 'Is Unique' attribute.
See Also:
MultiplicityElement.setIsUnique(boolean), UML2Package.getMultiplicityElement_IsUnique()

type

public Classifier type()
A query based on the following OCL expression: if returnResult->size() = 1 then returnResult->any().type else Set{} endif


validateOnlyBodyForQuery

public boolean validateOnlyBodyForQuery(DiagnosticChain diagnostics,
                                        java.util.Map context)
An invariant constraint based on the following OCL expression: bodyCondition->notEmpty() implies isQuery


Copyright 2003, 2005 IBM Corporation and others.
All Rights Reserved.