| java.lang.Object org.apache.commons.scxml.SCXMLHelper
SCXMLHelper | final public class SCXMLHelper (Code) | | Helper class, all methods static final.
|
Method Summary | |
public static void | cloneDatamodel(Datamodel datamodel, Context ctx, Evaluator evaluator, Log log) Clone data model. | public static Set | getAncestorClosure(Set states, Set upperBounds) Creates a set which contains given states and all their ancestors
recursively up to the upper bound. | public static TransitionTarget | getLCA(TransitionTarget tt1, TransitionTarget tt2) Finds the least common ancestor of transition targets tt1 and tt2 if
one exists. | public static String | getNodeValue(Node node) Retrieve a DOM node value as a string depending on its type. | public static Set | getStatesExited(Transition t, Set currentStates) Returns the set of all states (and parallels) which are exited if a
given transition t is going to be taken. | public static boolean | implementationOf(Class clas, Class interfayce) Whether the class implements the interface. | public static boolean | inConflict(Transition t1, Transition t2, Set currentStates) According to the UML definition, two transitions
are conflicting if the sets of states they exit overlap. | public static boolean | isDescendant(TransitionTarget tt, TransitionTarget ctx) Checks whether a transition target tt (State or Parallel) is a
descendant of the transition target context. | public static boolean | isLegalConfig(Set states, ErrorReporter errRep) Checks whether a given set of states is a legal Harel State Table
configuration (with the respect to the definition of the OR and AND
states). | public static boolean | isStringEmpty(String attr) Return true if the string is empty. | public static void | setNodeValue(Node node, String value) Set node value, depending on its type, from a String. | public static boolean | subtypeOf(Class child, Class parent) Whether the first argument is a subtype of the second. |
cloneDatamodel | public static void cloneDatamodel(Datamodel datamodel, Context ctx, Evaluator evaluator, Log log)(Code) | | Clone data model.
Parameters: ctx - The context to clone to. Parameters: datamodel - The datamodel to clone. Parameters: evaluator - The expression evaluator. Parameters: log - The error log. |
getAncestorClosure | public static Set getAncestorClosure(Set states, Set upperBounds)(Code) | | Creates a set which contains given states and all their ancestors
recursively up to the upper bound. Null upperBound means root
of the state machine.
Parameters: states - The Set of States Parameters: upperBounds - The Set of upper bound States transitive closure of a given state set |
getLCA | public static TransitionTarget getLCA(TransitionTarget tt1, TransitionTarget tt2)(Code) | | Finds the least common ancestor of transition targets tt1 and tt2 if
one exists.
Parameters: tt1 - First TransitionTarget Parameters: tt2 - Second TransitionTarget closest common ancestor of tt1 and tt2 or null |
getNodeValue | public static String getNodeValue(Node node)(Code) | | Retrieve a DOM node value as a string depending on its type.
Parameters: node - A node to be retreived The value as a string |
getStatesExited | public static Set getStatesExited(Transition t, Set currentStates)(Code) | | Returns the set of all states (and parallels) which are exited if a
given transition t is going to be taken.
Current states are necessary to be taken into account
due to orthogonal states and cross-region transitions -
see UML specs for more details.
Parameters: t - transition to be taken Parameters: currentStates - the set of current states (simple states only) a set of all states (including composite) which are exited if agiven transition is taken |
implementationOf | public static boolean implementationOf(Class clas, Class interfayce)(Code) | | Whether the class implements the interface.
Parameters: clas - The candidate class Parameters: interfayce - The interface true if clas implements interfayce, otherwise false |
inConflict | public static boolean inConflict(Transition t1, Transition t2, Set currentStates)(Code) | | According to the UML definition, two transitions
are conflicting if the sets of states they exit overlap.
Parameters: t1 - a transition to check against t2 Parameters: t2 - a transition to check against t1 Parameters: currentStates - the set of current states (simple states only) true if the t1 and t2 are conflicting transitions See Also: SCXMLHelper.getStatesExited(Transition,Set) |
isDescendant | public static boolean isDescendant(TransitionTarget tt, TransitionTarget ctx)(Code) | | Checks whether a transition target tt (State or Parallel) is a
descendant of the transition target context.
Parameters: tt - TransitionTarget to check - a potential descendant Parameters: ctx - TransitionTarget context - a potential ancestor true iff tt is a descendant of ctx, false otherwise |
isLegalConfig | public static boolean isLegalConfig(Set states, ErrorReporter errRep)(Code) | | Checks whether a given set of states is a legal Harel State Table
configuration (with the respect to the definition of the OR and AND
states).
Parameters: states - a set of states Parameters: errRep - ErrorReporter to report detailed error info if needed true if a given state configuration is legal, false otherwise |
isStringEmpty | public static boolean isStringEmpty(String attr)(Code) | | Return true if the string is empty.
Parameters: attr - The String to test Is string empty |
setNodeValue | public static void setNodeValue(Node node, String value)(Code) | | Set node value, depending on its type, from a String.
Parameters: node - A Node whose value is to be set Parameters: value - The new value |
subtypeOf | public static boolean subtypeOf(Class child, Class parent)(Code) | | Whether the first argument is a subtype of the second.
Parameters: child - The candidate subtype Parameters: parent - The supertype true if child is subtype of parent, otherwise false |
|
|