java.lang.Object
com.pauware.pauware_engine.Core.AbstractState
com.pauware.pauware_engine.Core.AbstractStateMachine
com.pauware.pauware_engine.Core.StateMachine
- All Implemented Interfaces:
Manageable
,Manageable_base
,java.io.Serializable
public class StateMachine extends AbstractStateMachine implements java.io.Serializable
This concrete class represents the general notion of State Machine in
UML.
Compatibility: Java 9.
- Since:
- 1.0
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pauware.pauware_engine.Core.AbstractState
AbstractState._Cross_over
-
Field Summary
Fields inherited from class com.pauware.pauware_engine.Core.AbstractStateMachine
_current_state, _eliminated_transitions, _execution, _listeners, _show_on_system_out, _transitions, _Undefined, _verbose, Compute_invariants, Don_t_compute_invariants, Don_t_show_on_system_out, Show_on_system_out
Fields inherited from class com.pauware.pauware_engine.Core.AbstractState
_active, _allowed_events, _AND, _do, _entry, _exit, _inputState, _invariant, _left, _Left_parenthesis, _name, _node, _outputState, _PlantUML_entry_point, _PlantUML_exit_point, _PlantUML_state, _PlantUML_state_entry_point, _PlantUML_state_exit_point, _PlantUML_transition, _PlantUML_transition_, _PlantUML_transition_execution, _right, _Right_parenthesis, _xor, Activated_state_display_message, Allow_header_text, Allowed_event_display_message, Completion, Disactivated_state_display_message, Do_activity_display_message, Do_header_text, Entry_action_display_message, Entry_header_text, Exit_action_display_message, Exit_header_text, Invariant_header_text, Neutral_character, No_reentrance, Pseudo_event, Pseudo_state, Reentrance, Sequence_character, State_name_separator, Textual_view_subject_separator
-
Constructor Summary
Constructors Constructor Description StateMachine(AbstractState s, java.lang.String name)
StateMachine(AbstractState s, java.lang.String name, boolean show_on_system_err)
StateMachine(AbstractState s, java.lang.String name, boolean show_on_system_out, AbstractStateMachine_listener listener)
StateMachine(AbstractState s, java.lang.String name, boolean show_on_system_out, AbstractStateMachine_listener listener1, AbstractStateMachine_listener listener2)
-
Method Summary
Modifier and Type Method Description protected AbstractAction
action(java.lang.Object object, java.lang.String action, java.lang.Object[] args, byte reentrance_mode)
This method creates and returns an action instance that is compatible with the chosen platform, i.e., adaptation for platforms different from Java 9 have to provide specific code.protected AbstractAction
activity(java.lang.Object object, java.lang.String action, java.lang.Object[] args)
This method creates and returns an action instance that is compatible with the chosen platform, i.e., adaptation for platforms different from Java 9 have to provide specific code.protected AbstractState
createFather()
This method raises an instance ofRuntimeException
.protected AbstractGuard
guard(java.lang.Object guard_object, java.lang.String guard_action, java.lang.Object[] guard_args)
* This method creates and returns a guard instance that is compatible with the chosen platform, i.e., adaptation for platforms different from Java 9 have to provide specific code.Methods inherited from class com.pauware.pauware_engine.Core.AbstractStateMachine
activate, add_listener, async_current_state, completion, disactivate, equals, fires, fires, fires, fires, fires, fires, fires, fires, fires, fires, fires, fires, hashCode, in_state, remove_listener, root, run_to_completion, run_to_completion, start, stop, to_PlantUML, to_state, to_UML, unfires, verbose
Methods inherited from class com.pauware.pauware_engine.Core.AbstractState
_compute_state_views, _cross_over, active, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, allowedEvent, ancestor, and, and, brother, Clean_up, commonSuperWith, current_state, deep_history, deepStateInvariant, doActivity, doActivity, entry, exit, fictitious, get_allowed_events_label, get_do_label, get_invariant_label, hasForSuperState, inputState, is_deep_history, is_shallow_history, isAndWith, isInputState, isOutputState, isXorWith, leaf, lookup, name, name, outputState, reset_entryAction, reset_entryAction, reset_entryAction, reset_exitAction, reset_exitAction, reset_exitAction, set_completion, set_entryAction, set_entryAction, set_entryAction, set_exitAction, set_exitAction, set_exitAction, shallow_history, shallowStateInvariant, stateInvariant, stateInvariant, verify, xor
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pauware.pauware_engine.Core.Manageable_base
current_state, name
-
Constructor Details
-
StateMachine
- Parameters:
s
-name
-- Throws:
State_exception
- See Also:
AbstractStateMachine(AbstractState,String)
-
StateMachine
public StateMachine(AbstractState s, java.lang.String name, boolean show_on_system_err) throws State_exception- Parameters:
s
-name
-show_on_system_err
-- Throws:
State_exception
- See Also:
AbstractStateMachine(AbstractState,String,boolean)
-
StateMachine
public StateMachine(AbstractState s, java.lang.String name, boolean show_on_system_out, AbstractStateMachine_listener listener) throws State_exception- Parameters:
s
-name
-show_on_system_out
-listener
-- Throws:
State_exception
- See Also:
AbstractStateMachine(AbstractState,String,boolean,AbstractStateMachine_listener)
-
StateMachine
public StateMachine(AbstractState s, java.lang.String name, boolean show_on_system_out, AbstractStateMachine_listener listener1, AbstractStateMachine_listener listener2) throws State_exception- Parameters:
s
-name
-show_on_system_out
-listener1
-listener2
-- Throws:
State_exception
-
-
Method Details
-
createFather
This method raises an instance ofRuntimeException
. This is becauseAbstractStateMachine
instances are "root" states and thus may not be composed in larger state machines. However, this method is intended to be replaced as soon as the notion of "vertical composition" will be implemented within PauWare.- Specified by:
createFather
in classAbstractState
- Returns:
-
action
protected AbstractAction action(java.lang.Object object, java.lang.String action, java.lang.Object[] args, byte reentrance_mode)This method creates and returns an action instance that is compatible with the chosen platform, i.e., adaptation for platforms different from Java 9 have to provide specific code.- Specified by:
action
in classAbstractState
- Parameters:
object
-action
-args
-reentrance_mode
-- Returns:
- This is an instance of
Action
if thereentrance_mode
parameter is equal toAbstractState.No_reentrance
; Otherwise, it is an instance ofSendSignalAction
. - See Also:
Action
-
activity
protected AbstractAction activity(java.lang.Object object, java.lang.String action, java.lang.Object[] args)This method creates and returns an action instance that is compatible with the chosen platform, i.e., adaptation for platforms different from Java 9 have to provide specific code.- Specified by:
activity
in classAbstractState
- Parameters:
object
-action
-args
-- Returns:
- This is an instance of
Do_activity
. - See Also:
Action
-
guard
protected AbstractGuard guard(java.lang.Object guard_object, java.lang.String guard_action, java.lang.Object[] guard_args)* This method creates and returns a guard instance that is compatible with the chosen platform, i.e., adaptation for platforms different from Java 9 have to provide specific code.- Specified by:
guard
in classAbstractState
- Parameters:
guard_object
-guard_action
-guard_args
-- Returns:
- this is an instance of
Guard
. - See Also:
Guard
-