org.eclipse.uml2.uml
Interface StateMachine

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

public interface StateMachine
extends Behavior

A representation of the model object 'State Machine'. StateMachines can be used to express event-driven behaviors of parts of a system. Behavior is modeled as a traversal of a graph of Vertices interconnected by one or more joined Transition arcs that are triggered by the dispatching of successive Event occurrences. During this traversal, the StateMachine may execute a sequence of Behaviors associated with various elements of the StateMachine.

From package UML::StateMachines.

The following features are supported:

See Also:
UMLPackage.getStateMachine()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 boolean ancestor(Vertex s1, Vertex s2)
          The query ancestor(s1, s2) checks whether Vertex s2 is an ancestor of Vertex s1.
 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.
 Region LCA(Vertex s1, Vertex s2)
          The operation LCA(s1,s2) returns the Region that is the least common ancestor of Vertices s1 and s2, based on the StateMachine containment hierarchy.
 State LCAState(Vertex v1, Vertex v2)
          This utility funciton is like the LCA, except that it returns the nearest composite State that contains both input Vertices.
 boolean validateClassifierContext(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The Classifier context of a StateMachine 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 StateMachine 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 StateMachine of a BehavioralFeature must be the Classifier that owns the BehavioralFeature.
 boolean validateMethod(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          A StateMachine as the method for a BehavioralFeature cannot have entry/exit connection points.
 
Methods inherited from interface org.eclipse.uml2.uml.Behavior
behavioredClassifier, createOwnedParameter, createOwnedParameterSet, createPostcondition, createPostcondition, createPrecondition, createPrecondition, getContext, getOwnedParameter, getOwnedParameter, getOwnedParameters, getOwnedParameterSet, getOwnedParameterSet, getOwnedParameterSets, getPostcondition, getPostcondition, getPostconditions, getPrecondition, getPrecondition, getPreconditions, getRedefinedBehavior, getRedefinedBehavior, getRedefinedBehaviors, getSpecification, inputParameters, isReentrant, isSetIsReentrant, outputParameters, setIsReentrant, setSpecification, unsetIsReentrant, validateFeatureOfContextClassifier, validateMostOneBehavior, 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, getOwnedPort, getOwnedPorts
 
Methods inherited from interface org.eclipse.uml2.uml.StructuredClassifier
allRoles, createOwnedAttribute, createOwnedAttribute, createOwnedAttribute, createOwnedConnector, getOwnedAttribute, getOwnedAttribute, getOwnedAttributes, getOwnedConnector, getOwnedConnector, getOwnedConnectors, getPart, getPart, getParts, getRole, getRole, getRoles
 
Methods inherited from interface org.eclipse.uml2.uml.Classifier
allAttributes, allFeatures, allParents, allRealizedInterfaces, allSlottableFeatures, allUsedInterfaces, createCollaborationUse, createGeneralization, createOwnedUseCase, createRepresentation, createSubstitution, directlyRealizedInterfaces, directlyUsedInterfaces, 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, isFinalSpecialization, isSubstitutableFor, maySpecializeType, parents, setIsAbstract, setIsFinalSpecialization, setRepresentation, validateMapsToGeneralizationSet, validateNoCyclesInGeneralization, validateNonFinalParents, 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, validateCannotImportOwnedMembers, validateCannotImportSelf, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateNonLeafRedefinition, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
 
Methods inherited from interface org.eclipse.uml2.uml.PackageableElement
validateNamespaceNeedsVisibility
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
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, getAllImplementedInterfaces, getClassifierBehavior, getImplementedInterfaces, getInterfaceRealization, getInterfaceRealization, getInterfaceRealizations, getOwnedBehavior, getOwnedBehavior, getOwnedBehaviors, 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 StateMachine.

From package UML::StateMachines.

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.

From package UML::StateMachines.

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 StateMachine. They represent the interface of the StateMachine when used as part of submachine State

From package UML::StateMachines.

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 redefines the following features:

The StateMachines of which this is an extension.

From package UML::StateMachines.

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 StateMachine cannot be an Interface. _'context' <> null 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 StateMachine of a BehavioralFeature must be the Classifier that owns the BehavioralFeature. specification <> null implies ( _'context' <> null 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.

LCA

Region LCA(Vertex s1,
           Vertex s2)
The operation LCA(s1,s2) returns the Region that is the least common ancestor of Vertices s1 and s2, based on the StateMachine containment hierarchy. result = (if ancestor(s1, s2) then s2.container else if ancestor(s2, s1) then s1.container else LCA(s1.container.state, s2.container.state) endif endif)

From package UML::StateMachines.


ancestor

boolean ancestor(Vertex s1,
                 Vertex s2)
The query ancestor(s1, s2) checks whether Vertex s2 is an ancestor of Vertex s1. result = (if (s2 = s1) then true else if s1.container.stateMachine->notEmpty() then true else if s2.container.stateMachine->notEmpty() then false else ancestor(s1, s2.container.state) endif endif endif )

From package UML::StateMachines.


LCAState

State LCAState(Vertex v1,
               Vertex v2)
This utility funciton is like the LCA, except that it returns the nearest composite State that contains both input Vertices. result = (if v2.oclIsTypeOf(State) and ancestor(v1, v2) then v2.oclAsType(State) else if v1.oclIsTypeOf(State) and ancestor(v2, v1) then v1.oclAsType(State) else if (v1.container.state->isEmpty() or v2.container.state->isEmpty()) then null.oclAsType(State) else LCAState(v1.container.state, v2.container.state) endif endif endif)

From package UML::StateMachines.


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 StateMachine are Pseudostates of kind entry point or exit point. connectionPoint->forAll (kind = PseudostateKind::entryPoint or kind = PseudostateKind::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 StateMachine as the method for a BehavioralFeature cannot have entry/exit connection points. specification <> null implies connectionPoint->isEmpty()

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

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.