|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.evelopers.unimod.core.ModelElement
com.evelopers.unimod.core.stateworks.State
State abstraction.
| Field Summary | |
static java.lang.String |
INCOMING_TRANSITIONS_PROPERTY
|
protected java.util.List |
incomingTransitions
Incoming transitions. |
static java.lang.String |
ON_ENTER_ACTIONS_PROPERTY
|
protected java.util.List |
onEnterActions
On-enter actions to be executed on-enter |
static java.lang.String |
OUTGOING_TRANSITIONS_PROPERTY
|
protected java.util.List |
outgoingTransitions
Outgoing transitions. |
static java.lang.String |
STATE_TYPE_PROPERTY
|
protected java.util.List |
submachines
Included state machines to be executed on-enter if current state is active. |
static java.lang.String |
SUBMACHINES_PROPERTY
|
protected java.util.List |
substates
Substates. |
static java.lang.String |
SUBSTATES_PROPERTY
|
protected State |
superstate
Superstate. |
protected StateType |
type
|
| Fields inherited from class com.evelopers.unimod.core.ModelElement |
listeners, name, NAME_PROPERTY, stereotype, STEREOTYPE_PROPERTY |
| Constructor Summary | |
protected |
State(java.lang.String name,
StateType type)
Creates states with given name. |
| Method Summary | |
void |
accept(ModelVisitor v)
Accepts given visitor by substates if ModelVisitor.visit(com.evelopers.unimod.core.ModelElement)returns
true. |
(package private) void |
addIncomingTransition(Transition transition)
Adds incoming transition. |
void |
addOnEnterAction(Action action)
Adds on-enter action |
(package private) void |
addOutgoingTransition(Transition transition)
Adds outgoing transition. |
void |
addSubmachine(StateMachine sm)
Adds included state machine |
void |
addSubstate(State substate)
Adds substate. |
boolean |
equals(java.lang.Object o)
Compare with another model element. |
java.util.List |
getEvents(boolean any)
Returns all events that are located on outgoing transitions It's guaranteed that if ay event is present, it will be last in list |
java.util.List |
getFilteredOutgoingTransitions(Event event,
boolean elseGuard)
Returs filtered list of outgoing transitions. |
java.util.List |
getIncomingTransitions()
|
State |
getInitialSubstate()
|
java.util.List |
getOnEnterActions()
Returns list of on-enter actions |
java.util.List |
getOutgoingTransitions()
Returns outgoing transitions. |
java.util.List |
getSubmachines()
Returns list of included state machines |
java.util.List |
getSubstates()
Returns substates. |
State |
getSuperstate()
Returns superstate. |
StateType |
getType()
Returns state type. |
int |
hashCode()
Returns model element hash code. |
boolean |
hasSuperstate()
Returns true if state has superstate. |
boolean |
isComposite()
Returns true if state has substates. |
boolean |
isTop()
Returns true if state is top state |
(package private) void |
removeIncomingTransition(Transition transition)
|
void |
removeOnEnterAction(Action action)
Removes on-enter action |
(package private) void |
removeOutgoingTransition(Transition transition)
|
void |
removeSubmachine(StateMachine sm)
Removes given included state machine from list of submachines |
void |
removeSubstate(State substate)
Removes given substate. |
void |
setSuperstate(State superstate)
Sets superstate |
| Methods inherited from class com.evelopers.unimod.core.ModelElement |
addPropertyChangeListener, firePropertyChange, getName, getStereotype, initListeners, removePropertyChangeListener, setName, setStereotype, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String STATE_TYPE_PROPERTY
public static final java.lang.String OUTGOING_TRANSITIONS_PROPERTY
public static final java.lang.String INCOMING_TRANSITIONS_PROPERTY
public static final java.lang.String SUBSTATES_PROPERTY
public static final java.lang.String SUBMACHINES_PROPERTY
public static final java.lang.String ON_ENTER_ACTIONS_PROPERTY
protected StateType type
protected State superstate
protected java.util.List outgoingTransitions
protected java.util.List incomingTransitions
protected java.util.List substates
protected java.util.List submachines
protected java.util.List onEnterActions
| Constructor Detail |
protected State(java.lang.String name,
StateType type)
name - state name| Method Detail |
public State getSuperstate()
public void setSuperstate(State superstate)
superstate - superstatepublic java.util.List getOutgoingTransitions()
public java.util.List getIncomingTransitions()
public java.util.List getFilteredOutgoingTransitions(Event event,
boolean elseGuard)
State state = ...
Event e1 = new Event("e1");
List transitions;
// Transitions trigged on event [e1] with not else guard condition
transitions = state.getFilteredOutgoingTransitions(e1, false);
...
// Transitions trigged on event [e1] with else guard condition
transitions = state.getFilteredOutgoingTransitions(e1, true);
...
// Transitions trigged on any event with not else guard condition
transitions = state.getFilteredOutgoingTransitions(Event.ANY, false);
...
// Transitions trigged on any event with else guard condition
transitions = state.getFilteredOutgoingTransitions(Event.ANY, true);
If event is not equal to Event.ANY
then transitions trigged on eny event won't be returned.
event - event trigging the transitions in result listelseGuard - whether transitions in result list have else guard condition
void addOutgoingTransition(Transition transition)
transition - transition to addvoid removeOutgoingTransition(Transition transition)
void addIncomingTransition(Transition transition)
transition - transition to addvoid removeIncomingTransition(Transition transition)
public StateType getType()
public void addSubstate(State substate)
substate - statepublic void removeSubstate(State substate)
substate - state to remove
java.lang.IllegalStateException - if given state is not substate of state is being called.public State getInitialSubstate()
State is composite and has
initial state;
null elsewise.public java.util.List getSubstates()
public boolean isComposite()
public boolean isTop()
public boolean hasSuperstate()
public java.util.List getEvents(boolean any)
any - include any events or not
public java.util.List getSubmachines()
public void addSubmachine(StateMachine sm)
sm - state machine to includepublic void removeSubmachine(StateMachine sm)
sm - state machine to removepublic java.util.List getOnEnterActions()
public void addOnEnterAction(Action action)
action - action to addpublic void removeOnEnterAction(Action action)
action - on-enter action to removepublic int hashCode()
ModelElement
hashCode in class ModelElementpublic boolean equals(java.lang.Object o)
ModelElement
equals in class ModelElemento - another model element
public void accept(ModelVisitor v)
throws VisitorException
ModelVisitor.visit(com.evelopers.unimod.core.ModelElement)returns
true.
accept in class ModelElementv - visitor to visit model element
VisitorException - thrown by visitor methodsModelElement.accept(com.evelopers.unimod.core.ModelVisitor)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||