|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.smc.model.SmcElement
public abstract class SmcElement
The super class for all abstract syntax tree elements. Provides the interface for the visitor classes. See the Visitor pattern in GoF (p. 331).
SmcFSM
,
SmcMap
,
SmcState
,
SmcTransition
,
SmcGuard
,
SmcAction
,
SmcParameter
,
SmcVisitor
Nested Class Summary | |
---|---|
static class |
SmcElement.TransType
The SMC transitions fall into four types. |
Field Summary | |
---|---|
protected int |
_lineNumber
The line number where this element is defined in the .sm file. |
protected java.lang.String |
_name
An element has a unique name. |
static java.lang.String |
NIL_STATE
Inner loopback transitions use "nil" as their destination state. |
Constructor Summary | |
---|---|
protected |
SmcElement(java.lang.String name,
int lineNumber)
Default constructor. |
Method Summary | |
---|---|
abstract void |
accept(SmcVisitor visitor)
Accepts a new visitor which performs some action upon this abstract syntax tree element. |
int |
getLineNumber()
Returns the element's position in the .sm file. |
java.lang.String |
getName()
Returns the element's unique name. |
static java.util.List<SmcTransition> |
merge(java.util.List<SmcTransition> l1,
java.util.List<SmcTransition> l2,
java.util.Comparator<SmcTransition> c)
Returns an ordered transition list with no repeated entries by merging two transition lists together. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String _name
protected final int _lineNumber
public static final java.lang.String NIL_STATE
Constructor Detail |
---|
protected SmcElement(java.lang.String name, int lineNumber)
name
- the elements unique name.lineNumber
- where this element appears in the .sm
file.Method Detail |
---|
public abstract void accept(SmcVisitor visitor)
visitor
- a parser visitor.public java.lang.String getName()
public int getLineNumber()
public static java.util.List<SmcTransition> merge(java.util.List<SmcTransition> l1, java.util.List<SmcTransition> l2, java.util.Comparator<SmcTransition> c)
l1
- The first transition list.l2
- The second transition list.c
- Transition comparator.
|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |