|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.opencyc.uml.interpreter.StateInterpreter
Interprets an active state of a UML StateMachine.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
static int |
DEFAULT_VERBOSITY
The default verbosity of this object's output. |
protected Interpreter |
interpreter
the parent state machine interpreter |
protected boolean |
isThreadRunning
indicates whether a thread is running this state. |
protected ProcedureInterpreter |
procedureInterpreter
the procedure interpreter |
protected State |
state
the interpreted active state |
protected int |
verbosity
Sets verbosity of this object's output. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
StateInterpreter(Interpreter interpreter,
State state)
Constructs a new StateInterpreter object given the parent state machine interpreter and the state to interpret. |
Method Summary | |
protected void |
complete()
Completes this composite state. |
void |
enter()
Enters this state, performing the entry action and the do-activity. |
void |
enterState(State entryState)
Enters the given state, which might be the state interpreted by this state interpreter, or might be another state. |
void |
exit()
Exits this state. |
State |
getParentState()
Returns the parent state of the this state, or null if this is the top state. |
State |
getState()
Gets the interpreted active state |
void |
interpretTransitionEntry(Transition transition)
Interprets a transition into this state. |
void |
interpretTransitionExit(Transition transition)
Interprets a transition from this state. |
boolean |
isCompositeState()
Gets whether the interpreted state is a composite state. |
boolean |
isThreadRunning()
Gets whether a thread is running this state |
boolean |
isTopState()
Returns true if the interpreted state is the top state. |
protected void |
performEntryActions(Transition transition)
Performs entry actions for the given entry state and for each of its superstates disjoint from the superstates of the transition source state. |
void |
performTransitionEffect(Transition transition)
Performs the transition effect in this state and creates the transition completion event. |
void |
run()
Interprets the effects of a transition into the given state. |
void |
setState(State state)
Sets the interpreted active state |
void |
setVerbosity(int verbosity)
Sets verbosity of this object's output. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_VERBOSITY
protected int verbosity
protected Interpreter interpreter
protected ProcedureInterpreter procedureInterpreter
protected State state
protected boolean isThreadRunning
Constructor Detail |
public StateInterpreter(Interpreter interpreter, State state)
interpreter
- the parent state machine interpreterstate
- the state to interpretMethod Detail |
public void run()
run
in class java.lang.Thread
public void interpretTransitionEntry(Transition transition)
transition
- the transistionprotected void performEntryActions(Transition transition)
transition
- the transitionpublic void performTransitionEffect(Transition transition)
protected void complete()
public void enterState(State entryState)
entryState
- the given statepublic void enter()
public void interpretTransitionExit(Transition transition)
transition
- the transistionpublic void exit()
public State getState()
public void setState(State state)
state
- the interpreted active statepublic boolean isThreadRunning()
public boolean isCompositeState()
public void setVerbosity(int verbosity)
verbosity
- 0 --> quiet ... 9 -> maximum diagnostic inputpublic boolean isTopState()
public State getParentState()
state
- the given state
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |