Package cruise.umple.compiler
Class StateMachine
java.lang.Object
cruise.umple.compiler.StateMachine
public class StateMachine
extends java.lang.Object
An entity in a running program that can have a set of values (states) and which
changes values by taking transitions in response to various events.
NEW CLASS****************************************
-
Constructor Summary
Constructors Constructor Description StateMachine(java.lang.String aName)
-
Method Summary
Modifier and Type Method Description boolean
addOrMoveStateAt(State aState, int index)
boolean
addOrMoveStateMachineTraceItemAt(StateMachineTraceItem aStateMachineTraceItem, int index)
boolean
addOrMoveTraceRecordAt(TraceRecord aTraceRecord, int index)
boolean
addState(State aState)
State
addState(java.lang.String aName)
State
addState(java.lang.String aName, int index)
boolean
addStateAt(State aState, int index)
boolean
addStateMachineTraceItem(StateMachineTraceItem aStateMachineTraceItem)
boolean
addStateMachineTraceItemAt(StateMachineTraceItem aStateMachineTraceItem, int index)
boolean
addTraceRecord(TraceRecord aTraceRecord)
boolean
addTraceRecordAt(TraceRecord aTraceRecord, int index)
StateMachine
clone()
Please maintain this method if you're going to add new features to state machines.StateMachine
clone(java.util.List<Transition> inTransitions, State parentState)
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------void
delete()
boolean
deleteState(State aState)
Issue 519boolean
equals(java.lang.Object obj)
Event
findOrCreateEvent(java.lang.String aName)
StateMachine
findRegionBasedOnSequence(java.lang.String[] inSequence)
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------State
findState(java.lang.String aName)
State
findState(java.lang.String aName, boolean searchNestedStateMachines)
State
findStateBasedOnSequence(java.lang.String[] inSequence)
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------State
findStateDotNotaion(java.lang.String aName)
java.util.List<Event>
getAllEvents()
java.util.List<Guard>
getAllGuards()
java.util.ArrayList<Transition>
getAllTransitions()
boolean
getContainsDeepHistoryState()
boolean
getContainsHistoryState()
State
getDeepHistoryState()
Event
getEvent(java.lang.String eventName)
Event
getEventByMethod(Method inMethod)
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------java.util.List<Event>
getEvents()
java.util.List<State>
getFinalStates()
java.lang.String
getFullName()
boolean
getHasEntryAction()
boolean
getHasExitAction()
java.util.List<StateMachine>
getImmediateNestedStateMachines()
java.lang.String
getName()
java.util.List<StateMachine>
getNestedStateMachines()
State
getNullState()
State
getParentState()
boolean
getPooled()
boolean
getQueued()
before getContainsHistoryState { if ("H".equals(name)) { containsHistoryState = true; } } before getContainsDeepHistoryState { if ("HStar".equals(name)) { containsDeepHistoryState = true; } }int
getRecentSearchDepth()
StateMachine
getRootStateMachine()
State
getStartState()
State
getState(int index)
StateMachineTraceItem
getStateMachineTraceItem(int index)
java.util.List<StateMachineTraceItem>
getStateMachineTraceItems()
java.util.List<State>
getStates()
StateMachine
getSuperStateMachine()
Issue 935 - A helper function to retrieve the super state machine (state machine that has no parent state)TraceRecord
getTraceRecord(int index)
java.util.List<TraceRecord>
getTraceRecords()
java.lang.String
getType()
UmpleClass
getUmpleClass()
UmpleTrait
getUmpleTrait()
boolean
hasFinalStates()
int
hashCode()
boolean
hasParentState()
boolean
hasStateMachineTraceItems()
boolean
hasStates()
boolean
hasTraceRecords()
boolean
hasUmpleClass()
boolean
hasUmpleTrait()
int
indexOfState(State aState)
int
indexOfStateMachineTraceItem(StateMachineTraceItem aStateMachineTraceItem)
int
indexOfTraceRecord(TraceRecord aTraceRecord)
boolean
isContainsDeepHistoryState()
boolean
isContainsHistoryState()
boolean
isPooled()
boolean
isQueued()
static int
minimumNumberOfStateMachineTraceItems()
static int
minimumNumberOfStates()
static int
minimumNumberOfTraceRecords()
int
numberOfStateMachineTraceItems()
int
numberOfStates()
int
numberOfTraceRecords()
boolean
removeState(State aState)
boolean
removeStateMachineTraceItem(StateMachineTraceItem aStateMachineTraceItem)
boolean
removeTraceRecord(TraceRecord aTraceRecord)
boolean
setContainsDeepHistoryState(boolean aContainsDeepHistoryState)
boolean
setContainsHistoryState(boolean aContainsHistoryState)
boolean
setName(java.lang.String aName)
boolean
setParentState(State aParentState)
boolean
setPooled(boolean aPooled)
boolean
setQueued(boolean aQueued)
boolean
setRecentSearchDepth(int aRecentSearchDepth)
boolean
setUmpleClass(UmpleClass aUmpleClass)
boolean
setUmpleTrait(UmpleTrait aUmpleTrait)
java.lang.String
toString()
-
Constructor Details
-
StateMachine
public StateMachine(java.lang.String aName)
-
-
Method Details
-
setRecentSearchDepth
public boolean setRecentSearchDepth(int aRecentSearchDepth) -
setName
public boolean setName(java.lang.String aName) -
setContainsHistoryState
public boolean setContainsHistoryState(boolean aContainsHistoryState) -
setContainsDeepHistoryState
public boolean setContainsDeepHistoryState(boolean aContainsDeepHistoryState) -
setQueued
public boolean setQueued(boolean aQueued) -
setPooled
public boolean setPooled(boolean aPooled) -
getRecentSearchDepth
public int getRecentSearchDepth() -
getName
public java.lang.String getName() -
getContainsHistoryState
public boolean getContainsHistoryState() -
getContainsDeepHistoryState
public boolean getContainsDeepHistoryState() -
getQueued
public boolean getQueued()before getContainsHistoryState { if ("H".equals(name)) { containsHistoryState = true; } } before getContainsDeepHistoryState { if ("HStar".equals(name)) { containsDeepHistoryState = true; } } -
getPooled
public boolean getPooled() -
isContainsHistoryState
public boolean isContainsHistoryState() -
isContainsDeepHistoryState
public boolean isContainsDeepHistoryState() -
isQueued
public boolean isQueued() -
isPooled
public boolean isPooled() -
getUmpleClass
-
hasUmpleClass
public boolean hasUmpleClass() -
getUmpleTrait
-
hasUmpleTrait
public boolean hasUmpleTrait() -
getParentState
-
hasParentState
public boolean hasParentState() -
getState
-
getStates
-
numberOfStates
public int numberOfStates() -
hasStates
public boolean hasStates() -
indexOfState
-
getStateMachineTraceItem
-
getStateMachineTraceItems
-
numberOfStateMachineTraceItems
public int numberOfStateMachineTraceItems() -
hasStateMachineTraceItems
public boolean hasStateMachineTraceItems() -
indexOfStateMachineTraceItem
-
getTraceRecord
-
getTraceRecords
-
numberOfTraceRecords
public int numberOfTraceRecords() -
hasTraceRecords
public boolean hasTraceRecords() -
indexOfTraceRecord
-
setUmpleClass
-
setUmpleTrait
-
setParentState
-
minimumNumberOfStates
public static int minimumNumberOfStates() -
addState
-
addState
-
removeState
-
addStateAt
-
addOrMoveStateAt
-
minimumNumberOfStateMachineTraceItems
public static int minimumNumberOfStateMachineTraceItems() -
addStateMachineTraceItem
-
removeStateMachineTraceItem
-
addStateMachineTraceItemAt
-
addOrMoveStateMachineTraceItemAt
public boolean addOrMoveStateMachineTraceItemAt(StateMachineTraceItem aStateMachineTraceItem, int index) -
minimumNumberOfTraceRecords
public static int minimumNumberOfTraceRecords() -
addTraceRecord
-
removeTraceRecord
-
addTraceRecordAt
-
addOrMoveTraceRecordAt
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
delete
public void delete() -
getHasExitAction
public boolean getHasExitAction() -
getHasEntryAction
public boolean getHasEntryAction() -
getEvent
-
getAllGuards
-
getAllEvents
-
getEvents
-
getAllTransitions
-
deleteState
Issue 519 -
getDeepHistoryState
-
findState
-
findState
-
getFinalStates
-
hasFinalStates
public boolean hasFinalStates() -
findOrCreateEvent
-
getStartState
-
getNullState
-
getType
public java.lang.String getType() -
getNestedStateMachines
-
getImmediateNestedStateMachines
-
findStateDotNotaion
-
getRootStateMachine
-
getFullName
public java.lang.String getFullName() -
addState
-
getSuperStateMachine
Issue 935 - A helper function to retrieve the super state machine (state machine that has no parent state) -
getEventByMethod
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- -
clone
Please maintain this method if you're going to add new features to state machines. This code manually creates a clone of a state machine.- Overrides:
clone
in classjava.lang.Object
-
clone
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start--------------------------------------- Parameters:
inTransitions
- the list of transitions that couldn't be cloned because their either source or destination have not been duplicated yet.parentState
- the state which includes this state machines as its nested state machines.- Returns:
- returns a new state machines Please maintain this method if you're going to add new features to state machines. This code manually creates a clone of a state machine. This method must be called through states which have a nested state machines.
-
findStateBasedOnSequence
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- -
findRegionBasedOnSequence
---------------------------------end---------------------------------------- ---------------------------------------------------------------------------- ---------------------------------Start-------------------------------------- -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-