Package com.sodius.mdw.metamodel.uml21
Interface ExceptionHandler
-
- All Superinterfaces:
Comparable<Object>,Element,org.eclipse.emf.ecore.EModelElement,org.eclipse.emf.ecore.EObject,MDWEObject,MDWObject,org.eclipse.emf.common.notify.Notifier
public interface ExceptionHandler extends Element
A representation of the model object 'Exception Handler'. An exception handler is an element that specifies a body to execute in case the specified exception occurs during the execution of the protected node.The following features are supported:
- See Also:
UMLPackage.getExceptionHandler()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectNodegetExceptionInput()Returns the value of the 'Exception Input' reference.ClassifiergetExceptionType(String name)Retrieves the firstClassifierwith the specified 'Name' from the ' Exception Type' reference list.ClassifiergetExceptionType(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)Retrieves the firstClassifierwith the specified 'Name' from the ' Exception Type' reference list.MDWEList<Classifier>getExceptionTypes()Returns the value of the 'Exception Type' reference list.ExecutableNodegetHandlerBody()Returns the value of the 'Handler Body' reference.ExecutableNodegetProtectedNode()Returns the value of the 'Protected Node' container reference.voidsetExceptionInput(ObjectNode value)Sets the value of the 'Exception Input' reference.voidsetHandlerBody(ExecutableNode value)Sets the value of the 'Handler Body' reference.voidsetProtectedNode(ExecutableNode value)Sets the value of the 'Protected Node' container reference.booleanvalidateEdgeSourceTarget(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)An edge that has a source in an exception handler structured node must have its target in the handler also, and vice versa.booleanvalidateExceptionBody(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The exception handler and its input object node are not the source or target of any edge.booleanvalidateOneInput(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The handler body has one input, and that input is the same as the exception input.booleanvalidateResultPins(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The result pins of the exception handler body must correspond in number and types to the result pins of the protected node.-
Methods inherited from interface com.sodius.mdw.metamodel.uml21.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, 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, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
-
Methods inherited from interface com.sodius.mdw.core.model.MDWObject
compareTo, eExtendedClass, eIsInstanceOf, eIsInstanceOf, eIsProfiled, eIsRemoved, eMetamodel, eMetaTypeName, eModel, eRemove, eSetUniqueID, eUniqueID, superScript, superScript, toBoolean, toBoolean, toByte, toByte, toChar, toChar, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toList, toList, toList, toList, toList, toLong, toLong, toObject, toObject, toSet, toSet, toShort, toShort, toString, toString
-
-
-
-
Method Detail
-
getHandlerBody
ExecutableNode getHandlerBody()
Returns the value of the 'Handler Body' reference. A node that is executed if the handler satisfies an uncaught exception.- Returns:
- the value of the 'Handler Body' reference.
- See Also:
setHandlerBody(ExecutableNode),UMLPackage.getExceptionHandler_HandlerBody()
-
setHandlerBody
void setHandlerBody(ExecutableNode value)
Sets the value of the 'Handler Body' reference.- Parameters:
value- the new value of the 'Handler Body' reference.- See Also:
getHandlerBody()
-
getExceptionInput
ObjectNode getExceptionInput()
Returns the value of the 'Exception Input' reference. An object node within the handler body. When the handler catches an exception, the exception token is placed in this node, causing the body to execute.- Returns:
- the value of the 'Exception Input' reference.
- See Also:
setExceptionInput(ObjectNode),UMLPackage.getExceptionHandler_ExceptionInput()
-
setExceptionInput
void setExceptionInput(ObjectNode value)
Sets the value of the 'Exception Input' reference.- Parameters:
value- the new value of the 'Exception Input' reference.- See Also:
getExceptionInput()
-
getExceptionTypes
MDWEList<Classifier> getExceptionTypes()
Returns the value of the 'Exception Type' reference list. The list contents are of typeClassifier. The kind of instances that the handler catches. If an exception occurs whose type is any of the classifiers in the set, the handler catches the exception and executes its body.- Returns:
- the value of the 'Exception Type' reference list.
- See Also:
UMLPackage.getExceptionHandler_ExceptionType()
-
getExceptionType
Classifier getExceptionType(String name)
Retrieves the firstClassifierwith the specified 'Name' from the ' Exception Type' reference list.- Parameters:
name- The 'Name' of theClassifierto retrieve, ornull.- Returns:
- The first
Classifierwith the specified 'Name', ornull. - See Also:
getExceptionTypes()
-
getExceptionType
Classifier getExceptionType(String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
Retrieves the firstClassifierwith the specified 'Name' from the ' Exception Type' reference list.- Parameters:
name- The 'Name' of theClassifierto retrieve, ornull.ignoreCase- Whether to ignore case inStringcomparisons.eClass- The Ecore class of theClassifierto retrieve, ornull.- Returns:
- The first
Classifierwith the specified 'Name', ornull. - See Also:
getExceptionTypes()
-
getProtectedNode
ExecutableNode getProtectedNode()
Returns the value of the 'Protected Node' container reference. It is bidirectional and its opposite is 'Handler'. The node protected by the handler. The handler is examined if an exception propagates to the outside of the node.- Returns:
- the value of the 'Protected Node' container reference.
- See Also:
setProtectedNode(ExecutableNode),UMLPackage.getExceptionHandler_ProtectedNode(),ExecutableNode.getHandlers()
-
setProtectedNode
void setProtectedNode(ExecutableNode value)
Sets the value of the 'Protected Node' container reference.- Parameters:
value- the new value of the 'Protected Node' container reference.- See Also:
getProtectedNode()
-
validateExceptionBody
boolean validateExceptionBody(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The exception handler and its input object node are not the source or target of any edge. true
-
validateResultPins
boolean validateResultPins(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The result pins of the exception handler body must correspond in number and types to the result pins of the protected node. true
-
validateOneInput
boolean validateOneInput(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)The handler body has one input, and that input is the same as the exception input. true
-
validateEdgeSourceTarget
boolean validateEdgeSourceTarget(org.eclipse.emf.common.util.DiagnosticChain diagnostics, Map context)An edge that has a source in an exception handler structured node must have its target in the handler also, and vice versa. true
-
-