|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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:
Owned Parameter
Class
Is Query
Datatype
Precondition
Postcondition
Redefined Operation
Body Condition
UML2Package.getOperation()
Field Summary | |
static 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(EClass eClass)
Creates a Parameter and appends it to the 'Owned Parameter' containment reference list |
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. |
EList |
getFeaturingClassifiers()
|
EList |
getFormalParameters()
|
int |
getLower()
|
Namespace |
getNamespace()
|
EList |
getOwnedMembers()
|
Parameter |
getOwnedParameter(String unqualifiedName)
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. |
EList |
getOwnedRules()
|
Constraint |
getPostcondition(String unqualifiedName)
Retrieves the Constraint with the specified name from the 'Postcondition' reference list |
EList |
getPostconditions()
Returns the value of the 'Postcondition' reference list. |
Constraint |
getPrecondition(String unqualifiedName)
Retrieves the Constraint with the specified name from the 'Precondition' reference list |
EList |
getPreconditions()
Returns the value of the 'Precondition' reference list. |
EList |
getRaisedExceptions()
|
EList |
getRedefinedElements()
|
Operation |
getRedefinedOperation(String unqualifiedName)
Retrieves the Operation with the specified name from the 'Redefined Operation' reference list |
EList |
getRedefinedOperations()
Returns the value of the 'Redefined Operation' reference list. |
EList |
getRedefinitionContexts()
|
Type |
getType()
|
int |
getUpper()
|
boolean |
isConsistentWith(RedefinableElement redefinee)
A query based on the following OCL expression:
(redefinee.oclIsKindOf(Operation) and
let op: Operation = redefinee.oclAsType(Operation) in
self.formalParameter.size() = op.formalParameter.size() and
self.returnResult.size() = op.returnResult.size() and
forAll(i | op.formalParameter[i].type.conformsTo(self.formalParameter[i].type)) and
forAll(i | op.returnResult[i].type.conformsTo(self.returnResult[i].type))
)
|
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
|
int |
lower()
A query based on the following OCL expression:
if returnResult->size() = 1 then returnResult->any().lower else Set{} 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 |
setIsOrdered(boolean value)
|
void |
setIsQuery(boolean value)
Sets the value of the ' Is Query ' attribute |
void |
setIsUnique(boolean value)
|
void |
setType(Type value)
|
Classifier |
type()
A query based on the following OCL expression:
if returnResult->size() = 1 then returnResult->any().type else Set{} endif
|
int |
upper()
A query based on the following OCL expression:
if returnResult->size() = 1 then returnResult->any().upper else Set{} endif
|
boolean |
validateOnlyBodyForQuery(DiagnosticChain diagnostics,
Map context)
An invariant constraint based on the following OCL expression:
bodyCondition->notEmpty() implies isQuery
|
boolean |
validateTypeOfResult(DiagnosticChain diagnostics,
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, createReturnResult, getConcurrency, getFormalParameter, getMembers, getMethod, getMethods, getParameter, getParameters, getRaisedException, getReturnResult, getReturnResults, isAbstract, isDistinguishableFrom, setConcurrency, setIsAbstract |
Methods inherited from interface org.eclipse.uml2.NamedElement |
allNamespaces, createNameExpression, getClientDependencies, getClientDependency, getName, getNameExpression, getOwner, getQualifiedName, getVisibility, qualifiedName, separator, setName, setNameExpression, setVisibility, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership |
Methods inherited from interface org.eclipse.uml2.TemplateableElement |
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature |
Methods inherited from interface org.eclipse.uml2.Element |
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, 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, isStatic, setIsStatic |
Methods inherited from interface org.eclipse.uml2.RedefinableElement |
getRedefinitionContext, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid |
Methods inherited from interface org.eclipse.uml2.MultiplicityElement |
createLowerValue, createUpperValue, getLowerValue, getOwnedElements, getUpperValue, includesCardinality, includesMultiplicity, isMultivalued, lowerBound, setLowerBound, setLowerValue, setUpperBound, setUpperValue, upperBound, validateLowerEqLowerbound, validateLowerGe0, validateUpperEqUpperbound, validateUpperGeLower, validateUpperGt0 |
Methods inherited from interface org.eclipse.uml2.ParameterableElement |
getOwner, getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter |
Field Detail |
public static final String copyright
Method Detail |
public boolean isQuery()
"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.
setIsQuery(boolean)
,
UML2Package.getOperation_IsQuery()
public void setIsQuery(boolean value)
Is Query
' attribute.
value
- the new value of the 'Is Query' attribute.isQuery()
public EList getOwnedParameters()
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...
UML2Package.getOperation_OwnedParameter()
,
Parameter.getOperation()
public Parameter getOwnedParameter(String unqualifiedName)
Parameter
with the specified name from the 'Owned Parameter' containment reference list.
unqualifiedName
- The unqualified name of the Parameter
to retrieve.
Parameter
with the specified name, or null
.getOwnedParameters()
public Parameter createOwnedParameter(EClass eClass)
Parameter
and appends it to the 'Owned Parameter' containment reference list.
eClass
- The Ecore class of the Parameter
to create.
Parameter
.getOwnedParameters()
public Class getClass_()
Owned Operation
'.
If the meaning of the 'Class ' container reference isn't clear, there really should be more of a description here...
setClass_(org.eclipse.uml2.Class)
,
UML2Package.getOperation_Class_()
,
Class.getOwnedOperations()
public void setClass_(Class value)
Class
' container reference.
value
- the new value of the 'Class ' container reference.getClass_()
public DataType getDatatype()
Owned Operation
'.
If the meaning of the 'Datatype' container reference isn't clear, there really should be more of a description here...
setDatatype(DataType)
,
UML2Package.getOperation_Datatype()
,
DataType.getOwnedOperations()
public void setDatatype(DataType value)
Datatype
' container reference.
value
- the new value of the 'Datatype' container reference.getDatatype()
public EList getPreconditions()
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.
UML2Package.getOperation_Precondition()
public Constraint getPrecondition(String unqualifiedName)
Constraint
with the specified name from the 'Precondition' reference list.
unqualifiedName
- The unqualified name of the Constraint
to retrieve.
Constraint
with the specified name, or null
.getPreconditions()
public EList getPostconditions()
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.
UML2Package.getOperation_Postcondition()
public Constraint getPostcondition(String unqualifiedName)
Constraint
with the specified name from the 'Postcondition' reference list.
unqualifiedName
- The unqualified name of the Constraint
to retrieve.
Constraint
with the specified name, or null
.getPostconditions()
public EList getRedefinedOperations()
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.
UML2Package.getOperation_RedefinedOperation()
public Operation getRedefinedOperation(String unqualifiedName)
Operation
with the specified name from the 'Redefined Operation' reference list.
unqualifiedName
- The unqualified name of the Operation
to retrieve.
Operation
with the specified name, or null
.getRedefinedOperations()
public Constraint getBodyCondition()
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.
setBodyCondition(Constraint)
,
UML2Package.getOperation_BodyCondition()
public void setBodyCondition(Constraint value)
Body Condition
' reference.
value
- the new value of the 'Body Condition' reference.getBodyCondition()
public boolean validateTypeOfResult(DiagnosticChain diagnostics, Map context)
if returnResult->size() = 1 then
type = returnResult.type
else
type = nil
endif
public boolean isOrdered()
if returnResult->size() = 1 then returnResult->any().isOrdered else false endif
isOrdered
in interface MultiplicityElement
MultiplicityElement.setIsOrdered(boolean)
,
UML2Package.getMultiplicityElement_IsOrdered()
public boolean isUnique()
if returnResult->size() = 1 then returnResult->any().isUnique else true endif
isUnique
in interface MultiplicityElement
MultiplicityElement.setIsUnique(boolean)
,
UML2Package.getMultiplicityElement_IsUnique()
public int lower()
if returnResult->size() = 1 then returnResult->any().lower else Set{} endif
lower
in interface MultiplicityElement
public int upper()
if returnResult->size() = 1 then returnResult->any().upper else Set{} endif
upper
in interface MultiplicityElement
public Classifier type()
if returnResult->size() = 1 then returnResult->any().type else Set{} endif
public boolean validateOnlyBodyForQuery(DiagnosticChain diagnostics, Map context)
bodyCondition->notEmpty() implies isQuery
public boolean isConsistentWith(RedefinableElement redefinee)
(redefinee.oclIsKindOf(Operation) and
let op: Operation = redefinee.oclAsType(Operation) in
self.formalParameter.size() = op.formalParameter.size() and
self.returnResult.size() = op.returnResult.size() and
forAll(i | op.formalParameter[i].type.conformsTo(self.formalParameter[i].type)) and
forAll(i | op.returnResult[i].type.conformsTo(self.returnResult[i].type))
)
isConsistentWith
in interface RedefinableElement
public void setIsOrdered(boolean value)
setIsOrdered
in interface MultiplicityElement
value
- the new value of the 'Is Ordered' attribute.MultiplicityElement.isOrdered()
public void setIsUnique(boolean value)
setIsUnique
in interface MultiplicityElement
value
- the new value of the 'Is Unique' attribute.MultiplicityElement.isUnique()
public int getLower()
getLower
in interface MultiplicityElement
UML2Package.getMultiplicityElement_Lower()
public int getUpper()
getUpper
in interface MultiplicityElement
UML2Package.getMultiplicityElement_Upper()
public EList getRaisedExceptions()
getRaisedExceptions
in interface BehavioralFeature
UML2Package.getBehavioralFeature_RaisedException()
public EList getFormalParameters()
getFormalParameters
in interface BehavioralFeature
UML2Package.getBehavioralFeature_FormalParameter()
public Type getType()
getType
in interface TypedElement
TypedElement.setType(Type)
,
UML2Package.getTypedElement_Type()
public void setType(Type value)
setType
in interface TypedElement
value
- the new value of the 'Type' reference.TypedElement.getType()
public EList getRedefinitionContexts()
getRedefinitionContexts
in interface RedefinableElement
UML2Package.getRedefinableElement_RedefinitionContext()
public Namespace getNamespace()
getNamespace
in interface NamedElement
public EList getFeaturingClassifiers()
getFeaturingClassifiers
in interface Feature
UML2Package.getFeature_FeaturingClassifier()
,
Classifier.getFeatures()
public EList getOwnedMembers()
getOwnedMembers
in interface BehavioralFeature
public EList getOwnedRules()
getOwnedRules
in interface Namespace
UML2Package.getNamespace_OwnedRule()
,
Constraint.getNamespace()
public EList getRedefinedElements()
getRedefinedElements
in interface RedefinableElement
|
Copyright 2003, 2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |