org.eclipse.uml2.uml
Interface StateMachine

All Superinterfaces:
Behavior, BehavioredClassifier, Class, Classifier, Element, org.eclipse.emf.ecore.EModelElement, EncapsulatedClassifier, org.eclipse.emf.ecore.EObject, NamedElement, Namespace, org.eclipse.emf.common.notify.Notifier, PackageableElement, ParameterableElement, RedefinableElement, StructuredClassifier, TemplateableElement, Type
All Known Subinterfaces:
ProtocolStateMachine

public interface StateMachine
extends Behavior

A representation of the model object 'State Machine'. State machines can be used to express the behavior of part of a system. Behavior is modeled as a traversal of a graph of state nodes interconnected by one or more joined transition arcs that are triggered by the dispatching of series of (event) occurrences. During this traversal, the state machine executes a series of activities associated with various elements of the state machine.

The following features are supported:

See Also:
UMLPackage.getStateMachine()

Method Summary
 boolean ancestor(State s1, State s2)
          The query ancestor(s1, s2) checks whether s2 is an ancestor state of state s1. context StateMachine::ancestor (s1 : State, s2 : State) : Boolean result = if (s2 = s1) then true else if (s1.container->isEmpty) then true else if (s2.container->isEmpty) then false else (ancestor (s1, s2.container))
 Pseudostate createConnectionPoint(java.lang.String name)
          Creates a new Pseudostate, with the specified 'Name', and appends it to the 'Connection Point' containment reference list
 Region createRegion(java.lang.String name)
          Creates a new Region, with the specified 'Name', and appends it to the 'Region' containment reference list
 Pseudostate getConnectionPoint(java.lang.String name)
          Retrieves the first Pseudostate with the specified 'Name' from the 'Connection Point' containment reference list
 Pseudostate getConnectionPoint(java.lang.String name, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first Pseudostate with the specified 'Name' from the 'Connection Point' containment reference list
 org.eclipse.emf.common.util.EList<Pseudostate> getConnectionPoints()
          Returns the value of the 'Connection Point' containment reference list.
 StateMachine getExtendedStateMachine(java.lang.String name)
          Retrieves the first StateMachine with the specified 'Name' from the 'Extended State Machine' reference list
 StateMachine getExtendedStateMachine(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first StateMachine with the specified 'Name' from the 'Extended State Machine' reference list
 org.eclipse.emf.common.util.EList<StateMachine> getExtendedStateMachines()
          Returns the value of the 'Extended State Machine' reference list.
 Region getRegion(java.lang.String name)
          Retrieves the first Region with the specified 'Name' from the 'Region' containment reference list
 Region getRegion(java.lang.String name, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first Region with the specified 'Name' from the 'Region' containment reference list
 org.eclipse.emf.common.util.EList<Region> getRegions()
          Returns the value of the 'Region' containment reference list.
 State getSubmachineState(java.lang.String name)
          Retrieves the first State with the specified 'Name' from the 'Submachine State' reference list
 State getSubmachineState(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first State with the specified 'Name' from the 'Submachine State' reference list
 org.eclipse.emf.common.util.EList<State> getSubmachineStates()
          Returns the value of the 'Submachine State' reference list.
 boolean isRedefinitionContextValid(StateMachine redefined)
           This operation redefines the following operations: 'Is Redefinition Context Valid'
 Namespace LCA(State s1, State s2)
          The operation LCA(s1,s2) returns an orthogonal state or region which is the least common ancestor of states s1 and s2, based on the statemachine containment hierarchy.
 boolean validateClassifierContext(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The classifier context of a state machine cannot be an interface.
 boolean validateConnectionPoints(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The connection points of a state machine are pseudostates of kind entry point or exit point.
 boolean validateContextClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The context classifier of the method state machine of a behavioral feature must be the classifier that owns the behavioral feature.
 boolean validateMethod(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A state machine as the method for a behavioral feature cannot have entry/exit connection points.
 
Methods inherited from interface org.eclipse.uml2.uml.Behavior
createOwnedParameter, createOwnedParameterSet, createPostcondition, createPostcondition, createPrecondition, createPrecondition, getContext, getOwnedParameter, getOwnedParameter, getOwnedParameters, getOwnedParameterSet, getOwnedParameterSet, getOwnedParameterSets, getPostcondition, getPostcondition, getPostconditions, getPrecondition, getPrecondition, getPreconditions, getRedefinedBehavior, getRedefinedBehavior, getRedefinedBehaviors, getSpecification, isReentrant, setIsReentrant, setSpecification, validateFeatureOfContextClassifier, validateMostOneBehaviour, validateMustRealize, validateParametersMatch
 
Methods inherited from interface org.eclipse.uml2.uml.Class
createNestedClassifier, createOwnedOperation, createOwnedOperation, createOwnedReception, getExtension, getExtension, getExtensions, getNestedClassifier, getNestedClassifier, getNestedClassifiers, getOwnedOperation, getOwnedOperation, getOwnedOperations, getOwnedReception, getOwnedReception, getOwnedReceptions, getSuperClass, getSuperClass, getSuperClasses, isActive, isMetaclass, setIsActive, validatePassiveClass
 
Methods inherited from interface org.eclipse.uml2.uml.EncapsulatedClassifier
createOwnedPort, getOwnedPort, getOwnedPort, getOwnedPorts
 
Methods inherited from interface org.eclipse.uml2.uml.StructuredClassifier
createOwnedAttribute, createOwnedAttribute, createOwnedAttribute, createOwnedConnector, getOwnedAttribute, getOwnedAttribute, getOwnedAttributes, getOwnedConnector, getOwnedConnector, getOwnedConnectors, getPart, getPart, getParts, getRole, getRole, getRoles, validateMultiplicities
 
Methods inherited from interface org.eclipse.uml2.uml.Classifier
allFeatures, allParents, conformsTo, createCollaborationUse, createGeneralization, createOwnedUseCase, createRepresentation, createSubstitution, getAllAttributes, getAllOperations, getAllUsedInterfaces, getAttribute, getAttribute, getAttributes, getCollaborationUse, getCollaborationUse, getCollaborationUses, getFeature, getFeature, getFeatures, getGeneral, getGeneral, getGeneralization, getGeneralization, getGeneralizations, getGenerals, getInheritedMember, getInheritedMember, getInheritedMembers, getOperation, getOperation, getOperations, getOwnedUseCase, getOwnedUseCase, getOwnedUseCases, getPowertypeExtent, getPowertypeExtent, getPowertypeExtents, getRedefinedClassifier, getRedefinedClassifier, getRedefinedClassifiers, getRepresentation, getSubstitution, getSubstitution, getSubstitutions, getUseCase, getUseCase, getUseCases, getUsedInterfaces, hasVisibilityOf, inherit, inheritableMembers, isAbstract, maySpecializeType, parents, setIsAbstract, setRepresentation, validateGeneralizationHierarchies, validateMapsToGeneralizationSet, validateNoCyclesInGeneralization, validateSpecializeType
 
Methods inherited from interface org.eclipse.uml2.uml.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.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 org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.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 org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
 
Methods inherited from interface org.eclipse.uml2.uml.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 org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.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 org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
 
Methods inherited from interface org.eclipse.uml2.uml.BehavioredClassifier
createClassifierBehavior, createInterfaceRealization, createOwnedBehavior, createOwnedTrigger, getAllImplementedInterfaces, getClassifierBehavior, getImplementedInterfaces, getInterfaceRealization, getInterfaceRealization, getInterfaceRealizations, getOwnedBehavior, getOwnedBehavior, getOwnedBehaviors, getOwnedTrigger, getOwnedTrigger, getOwnedTriggers, setClassifierBehavior, validateClassBehavior
 

Method Detail

getRegions

org.eclipse.emf.common.util.EList<Region> getRegions()
Returns the value of the 'Region' containment reference list. The list contents are of type Region. It is bidirectional and its opposite is 'State Machine'.

This feature subsets the following features:

The regions owned directly by the state machine.

Returns:
the value of the 'Region' containment reference list.
See Also:
UMLPackage.getStateMachine_Region(), Region.getStateMachine()

createRegion

Region createRegion(java.lang.String name)
Creates a new Region, with the specified 'Name', and appends it to the 'Region' containment reference list.

Parameters:
name - The 'Name' for the new Region, or null.
Returns:
The new Region.
See Also:
getRegions()

getRegion

Region getRegion(java.lang.String name)
Retrieves the first Region with the specified 'Name' from the 'Region' containment reference list.

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

getRegion

Region getRegion(java.lang.String name,
                 boolean ignoreCase,
                 boolean createOnDemand)
Retrieves the first Region with the specified 'Name' from the 'Region' containment reference list.

Parameters:
name - The 'Name' of the Region to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a Region on demand if not found.
Returns:
The first Region with the specified 'Name', or null.
See Also:
getRegions()

getSubmachineStates

org.eclipse.emf.common.util.EList<State> getSubmachineStates()
Returns the value of the 'Submachine State' reference list. The list contents are of type State. It is bidirectional and its opposite is 'Submachine'. References the submachine(s) in case of a submachine state. Multiple machines are referenced in case of a concurrent state.

Returns:
the value of the 'Submachine State' reference list.
See Also:
UMLPackage.getStateMachine_SubmachineState(), State.getSubmachine()

getSubmachineState

State getSubmachineState(java.lang.String name)
Retrieves the first State with the specified 'Name' from the 'Submachine State' reference list.

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

getSubmachineState

State getSubmachineState(java.lang.String name,
                         boolean ignoreCase,
                         org.eclipse.emf.ecore.EClass eClass)
Retrieves the first State with the specified 'Name' from the 'Submachine State' reference list.

Parameters:
name - The 'Name' of the State to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the State to retrieve, or null.
Returns:
The first State with the specified 'Name', or null.
See Also:
getSubmachineStates()

getConnectionPoints

org.eclipse.emf.common.util.EList<Pseudostate> getConnectionPoints()
Returns the value of the 'Connection Point' containment reference list. The list contents are of type Pseudostate. It is bidirectional and its opposite is 'State Machine'.

This feature subsets the following features:

The connection points defined for this state machine. They represent the interface of the state machine when used as part of submachine state.

Returns:
the value of the 'Connection Point' containment reference list.
See Also:
UMLPackage.getStateMachine_ConnectionPoint(), Pseudostate.getStateMachine()

createConnectionPoint

Pseudostate createConnectionPoint(java.lang.String name)
Creates a new Pseudostate, with the specified 'Name', and appends it to the 'Connection Point' containment reference list.

Parameters:
name - The 'Name' for the new Pseudostate, or null.
Returns:
The new Pseudostate.
See Also:
getConnectionPoints()

getConnectionPoint

Pseudostate getConnectionPoint(java.lang.String name)
Retrieves the first Pseudostate with the specified 'Name' from the 'Connection Point' containment reference list.

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

getConnectionPoint

Pseudostate getConnectionPoint(java.lang.String name,
                               boolean ignoreCase,
                               boolean createOnDemand)
Retrieves the first Pseudostate with the specified 'Name' from the 'Connection Point' containment reference list.

Parameters:
name - The 'Name' of the Pseudostate to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a Pseudostate on demand if not found.
Returns:
The first Pseudostate with the specified 'Name', or null.
See Also:
getConnectionPoints()

getExtendedStateMachines

org.eclipse.emf.common.util.EList<StateMachine> getExtendedStateMachines()
Returns the value of the 'Extended State Machine' reference list. The list contents are of type StateMachine.

This feature subsets the following features:

The state machines of which this is an extension.

Returns:
the value of the 'Extended State Machine' reference list.
See Also:
UMLPackage.getStateMachine_ExtendedStateMachine()

getExtendedStateMachine

StateMachine getExtendedStateMachine(java.lang.String name)
Retrieves the first StateMachine with the specified 'Name' from the 'Extended State Machine' reference list.

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

getExtendedStateMachine

StateMachine getExtendedStateMachine(java.lang.String name,
                                     boolean ignoreCase,
                                     org.eclipse.emf.ecore.EClass eClass)
Retrieves the first StateMachine with the specified 'Name' from the 'Extended State Machine' reference list.

Parameters:
name - The 'Name' of the StateMachine to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the StateMachine to retrieve, or null.
Returns:
The first StateMachine with the specified 'Name', or null.
See Also:
getExtendedStateMachines()

validateClassifierContext

boolean validateClassifierContext(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
The classifier context of a state machine cannot be an interface. context->notEmpty() implies not context.oclIsKindOf(Interface)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateContextClassifier

boolean validateContextClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)
The context classifier of the method state machine of a behavioral feature must be the classifier that owns the behavioral feature. specification->notEmpty() implies (context->notEmpty() and specification->featuringClassifier->exists (c | c = context))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateConnectionPoints

boolean validateConnectionPoints(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)
The connection points of a state machine are pseudostates of kind entry point or exit point. conectionPoint->forAll (c | c.kind = #entryPoint or c.kind = #exitPoint)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateMethod

boolean validateMethod(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                       java.util.Map<java.lang.Object,java.lang.Object> context)
A state machine as the method for a behavioral feature cannot have entry/exit connection points. specification->notEmpty() implies connectionPoint->isEmpty()

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

LCA

Namespace LCA(State s1,
              State s2)
The operation LCA(s1,s2) returns an orthogonal state or region which is the least common ancestor of states s1 and s2, based on the statemachine containment hierarchy. true


ancestor

boolean ancestor(State s1,
                 State s2)
The query ancestor(s1, s2) checks whether s2 is an ancestor state of state s1. context StateMachine::ancestor (s1 : State, s2 : State) : Boolean result = if (s2 = s1) then true else if (s1.container->isEmpty) then true else if (s2.container->isEmpty) then false else (ancestor (s1, s2.container))


isRedefinitionContextValid

boolean isRedefinitionContextValid(StateMachine redefined)

This operation redefines the following operations:

The query isRedefinitionContextValid() specifies whether the redefinition contexts of a statemachine are properly related to the redefinition contexts of the specified statemachine to allow this element to redefine the other. The containing classifier of a redefining statemachine must redefine the containing classifier of the redefined statemachine. result = true


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