org.eclipse.ocl.examples.pivot
Interface Operation

All Superinterfaces:
DomainElement, DomainNamedElement, DomainOperation, DomainTypedElement, Element, org.eclipse.emf.ecore.EObject, Feature, MultiplicityElement, Nameable, NamedElement, Namespace, org.eclipse.emf.common.notify.Notifier, ParameterableElement, PivotObject, TemplateableElement, TypedElement, TypedMultiplicityElement, Visitable
All Known Subinterfaces:
Iteration
All Known Implementing Classes:
IterationImpl, OperationImpl

public interface Operation
extends Feature, Namespace, TemplateableElement, ParameterableElement, DomainOperation

A representation of the model object 'Operation'.

See Also:
PivotPackage.getOperation()
Generated
Model

Method Summary
 Parameter createOwnedParameter()
          Creates a new Parameter and appends it to the 'Owned Parameter' containment reference list.
 Class getClass_()
          Returns the value of the 'Class' reference.
 org.eclipse.emf.common.util.EList<Parameter> getOwnedParameter()
          Returns the value of the 'Owned Parameter' containment reference list.
 Type getOwningType()
          Returns the value of the 'Owning Type' container reference.
 Precedence getPrecedence()
          Returns the value of the 'Precedence' reference.
 org.eclipse.emf.common.util.EList<Type> getRaisedException()
          Returns the value of the 'Raised Exception' reference list.
 void setOwningType(Type value)
          Sets the value of the 'Owning Type' container reference.
 void setPrecedence(Precedence value)
          Sets the value of the 'Precedence' reference.
 boolean validateCompatibleReturn(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.Feature
getImplementation, getImplementationClass, setImplementation, setImplementationClass
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.TypedMultiplicityElement
CompatibleBody, makeParameter
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.TypedElement
getType, setType
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.NamedElement
createOwnedAnnotation, createOwnedRule, getName, getOwnedAnnotation, getOwnedRule, isStatic, setIsStatic, setName
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.Element
allOwnedElements, createOwnedComment, getETarget, getOwnedComment, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.util.Visitable
accept, eClass
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, 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.ocl.examples.domain.elements.DomainNamedElement
getName
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.MultiplicityElement
getLower, getUpper, includesCardinality, includesMultiplicity, isMultivalued, isOrdered, isUnique, lowerBound, setIsOrdered, setIsUnique, setLower, setUpper, upperBound
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.TemplateableElement
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getUnspecializedElement, isTemplate, parameterableElements, setOwnedTemplateSignature, setUnspecializedElement
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainOperation
getImplementation, getIndex, getInheritance, getParameterType, isStatic
 

Method Detail

getRaisedException

org.eclipse.emf.common.util.EList<Type> getRaisedException()
Returns the value of the 'Raised Exception' reference list. The list contents are of type Type. The exceptions that are declared as possible during an invocation of the operation.

Returns:
the value of the 'Raised Exception' reference list.
See Also:
PivotPackage.getOperation_RaisedException()
Generated
Model
ordered="false" annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/3.1.0/Pivot!Operation!raisedException'"

getOwnedParameter

org.eclipse.emf.common.util.EList<Parameter> getOwnedParameter()
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'. The parameters to the operation.

Returns:
the value of the 'Owned Parameter' containment reference list.
See Also:
PivotPackage.getOperation_OwnedParameter(), Parameter.getOperation()
Generated
Model
opposite="operation" containment="true" annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/3.1.0/Pivot!Operation!ownedParameter'"

getPrecedence

Precedence getPrecedence()
Returns the value of the 'Precedence' reference.

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

Returns:
the value of the 'Precedence' reference.
See Also:
setPrecedence(Precedence), PivotPackage.getOperation_Precedence()
Generated
Model
ordered="false" annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/3.1.0/Pivot!Operation!precedence'"

setPrecedence

void setPrecedence(Precedence value)
Sets the value of the 'Precedence' reference.

Parameters:
value - the new value of the 'Precedence' reference.
See Also:
getPrecedence()
Generated

createOwnedParameter

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

Returns:
The new Parameter.
See Also:
getOwnedParameter()
Generated

getOwningType

Type getOwningType()
Returns the value of the 'Owning Type' container reference. It is bidirectional and its opposite is 'Owned Operation'.

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

Returns:
the value of the 'Owning Type' container reference.
See Also:
setOwningType(Type), PivotPackage.getOperation_OwningType(), Type.getOwnedOperation()
Generated
Model
opposite="ownedOperation" transient="false" ordered="false" annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/3.1.0/Pivot!Operation!owningType'"

setOwningType

void setOwningType(Type value)
Sets the value of the 'Owning Type' container reference.

Parameters:
value - the new value of the 'Owning Type' container reference.
See Also:
getOwningType()
Generated

getClass_

Class getClass_()
Returns the value of the 'Class' reference. The class that owns the operation.

Returns:
the value of the 'Class' reference.
See Also:
PivotPackage.getOperation_Class()
Generated
Model
transient="true" changeable="false" volatile="true" ordered="false" annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/3.1.0/Pivot!Operation!class'"

validateCompatibleReturn

boolean validateCompatibleReturn(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)

Generated
Model
annotation="http://www.eclipse.org/emf/2002/GenModel body='/*\nlet\n bodyConstraint : Constraint = ownedRule->any(stereotype = \'body\')\nin bodyConstraint <> null implies\n let bodySpecification : ValueSpecification = bodyConstraint.specification\n in bodySpecification <> null and\n bodySpecification.oclIsKindOf(ExpressionInOCL) implies\n CompatibleBody(bodySpecification)\n\052/\ntry {\n\tfinal <%org.eclipse.ocl.examples.domain.evaluation.DomainEvaluator%> evaluator = new <%org.eclipse.ocl.examples.library.ecore.EcoreExecutorManager%>(this, null, <%org.eclipse.ocl.examples.pivot.PivotTables%>.LIBRARY);\n\tfinal <%org.eclipse.ocl.examples.domain.values.ValueFactory%> valueFactory = evaluator.getValueFactory();\n\tfinal <%org.eclipse.ocl.examples.domain.values.Value%> self = valueFactory.valueOf(this);\n\tfinal <%org.eclipse.ocl.examples.library.executor.ExecutorType%> T_Boolean = <%org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables%>.Types._Boolean;\n\t\n\tfinal <%org.eclipse.ocl.examples.domain.elements.DomainType%> returnType = T_Boolean;\n\tfinal <%org.eclipse.ocl.examples.domain.values.Value%> result = <%org.eclipse.ocl.examples.pivot.bodies.OperationBodies%>._invariant_CompatibleReturn.INSTANCE.evaluate(evaluator, returnType, self);\n\tfinal boolean resultIsNull = result.isNull();\n\tif (!resultIsNull && result.asBoolean()) {\t// true => true, false/null => dropthrough, invalid => exception\n\t\treturn true;\n\t}\n\tif (diagnostics != null) {\n\t\tint severity = resultIsNull ? <%org.eclipse.emf.common.util.Diagnostic%>.ERROR : <%org.eclipse.emf.common.util.Diagnostic%>.WARNING;\n\t\tString message = <%org.eclipse.osgi.util.NLS%>.bind(<%org.eclipse.ocl.examples.domain.messages.EvaluatorMessages%>.ValidationConstraintIsNotSatisfied_ERROR_, new Object[]{\"Operation\", \"CompatibleReturn\", <%org.eclipse.emf.ecore.util.EObjectValidator%>.getObjectLabel(this, context)});\n\t diagnostics.add(new <%org.eclipse.emf.common.util.BasicDiagnostic%>(severity, <%org.eclipse.ocl.examples.pivot.util.PivotValidator%>.DIAGNOSTIC_SOURCE, <%org.eclipse.ocl.examples.pivot.util.PivotValidator%>.OPERATION__COMPATIBLE_RETURN, message, new Object [] { this }));\n\t}\n\treturn false;\n} catch (<%org.eclipse.ocl.examples.domain.evaluation.InvalidValueException%> e) {\n\tString message = <%org.eclipse.osgi.util.NLS%>.bind(<%org.eclipse.ocl.examples.domain.messages.EvaluatorMessages%>.ValidationEvaluationFailed_ERROR_, new Object[]{\"Operation\", \"CompatibleReturn\", <%org.eclipse.emf.ecore.util.EObjectValidator%>.getObjectLabel(this, context)});\n\tthrow new <%org.eclipse.emf.common.util.WrappedException%>(message, e);\n}\n'"