public abstract class UmlUtils
extends java.lang.Object
Constructor and Description |
---|
UmlUtils() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.uml2.uml.Model |
getModel(java.lang.String modelPath)
Gets the model.
|
static org.eclipse.emf.ecore.resource.Resource |
getResource(java.lang.String modelPath)
Gets the resource for a model.
|
static boolean |
isFinalState(org.eclipse.uml2.uml.State state)
Checks if
State is a final state. |
static boolean |
isInitialState(org.eclipse.uml2.uml.State state)
Checks if
State is an initial state by checking if
it has incoming transition from UML's initial literal. |
static TransitionKind |
mapUmlTransitionType(org.eclipse.uml2.uml.Transition transition)
Map uml transtion type.
|
static java.lang.String |
resolveBodyByLanguage(java.lang.String language,
org.eclipse.uml2.uml.BodyOwner owner)
Resolve body by language.
|
static java.util.Collection<java.lang.String> |
resolveDererredEvents(org.eclipse.uml2.uml.State state)
Resolve dererred events from a state.
|
static org.eclipse.uml2.uml.Transition |
resolveInitialTransition(org.eclipse.uml2.uml.State state)
Resolve initial transition from a
State if it
exists, otherwise null is returned. |
static Action<java.lang.String,java.lang.String> |
resolveTransitionAction(org.eclipse.uml2.uml.Transition transition,
StateMachineComponentResolver<java.lang.String,java.lang.String> resolver)
Resolve transition action or null if no action was found.
|
static java.util.Collection<Action<java.lang.String,java.lang.String>> |
resolveTransitionActions(org.eclipse.uml2.uml.Transition transition,
StateMachineComponentResolver<java.lang.String,java.lang.String> resolver)
Resolve transition actions.
|
public static org.eclipse.uml2.uml.Model getModel(java.lang.String modelPath)
modelPath
- the model pathpublic static org.eclipse.emf.ecore.resource.Resource getResource(java.lang.String modelPath)
modelPath
- the model pathpublic static boolean isInitialState(org.eclipse.uml2.uml.State state)
State
is an initial state by checking if
it has incoming transition from UML's initial literal.state
- the statepublic static org.eclipse.uml2.uml.Transition resolveInitialTransition(org.eclipse.uml2.uml.State state)
State
if it
exists, otherwise null is returned.state
- the statepublic static java.util.Collection<Action<java.lang.String,java.lang.String>> resolveTransitionActions(org.eclipse.uml2.uml.Transition transition, StateMachineComponentResolver<java.lang.String,java.lang.String> resolver)
transition
- the transitionresolver
- the state machine component resolverpublic static Action<java.lang.String,java.lang.String> resolveTransitionAction(org.eclipse.uml2.uml.Transition transition, StateMachineComponentResolver<java.lang.String,java.lang.String> resolver)
transition
- the transitionresolver
- the state machine component resolverpublic static boolean isFinalState(org.eclipse.uml2.uml.State state)
State
is a final state.state
- the statepublic static java.lang.String resolveBodyByLanguage(java.lang.String language, org.eclipse.uml2.uml.BodyOwner owner)
language
- the languageowner
- the ownerpublic static java.util.Collection<java.lang.String> resolveDererredEvents(org.eclipse.uml2.uml.State state)
state
- the statepublic static TransitionKind mapUmlTransitionType(org.eclipse.uml2.uml.Transition transition)
transition
- the transition