|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.sf.smc.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| Field Summary | |
|---|---|
int |
_lineNumber
An element starts on a particular line number. |
protected java.lang.String |
_name
An element has a unique name. |
| 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. |
| 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
public final int _lineNumber
| 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 java.lang.String getName()
public int getLineNumber()
public abstract void accept(SmcVisitor visitor)
visitor - a parser visitor.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||