|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.smc.SmcElement
net.sf.smc.SmcAction
public final class SmcAction
Actions are used in both transtions and state Entry and Exit clauses. Actions are implemented as methods in the FSM's context class.
Actions have two properties:
true
, then the action
was a property assignment (var = value). This action is
supported only for C# and VB.Net target compilation.
Field Summary |
---|
Fields inherited from class net.sf.smc.SmcElement |
---|
_lineNumber, _name |
Constructor Summary | |
---|---|
SmcAction(java.lang.String name,
int lineNumber)
Creates the named action appearing on the given .sm line. |
|
SmcAction(java.lang.String name,
int lineNumber,
boolean propertyFlag,
java.util.List<java.lang.String> arguments)
Creates an action with all data members specified. |
Method Summary | |
---|---|
void |
accept(SmcVisitor visitor)
Pass this action to the visitor for processing. |
int |
compareTo(SmcAction action)
Returns an integer value <, = or > zero depending on whether this action is <, = or > action . |
java.util.List<java.lang.String> |
getArguments()
Returns the action's argument list. |
boolean |
isProperty()
Returns true if this action is a .Net property
assignment and false if not. |
void |
setArguments(java.util.List<java.lang.String> args)
Sets the action's arguments. |
void |
setProperty(boolean flag)
If flag is true , then this action is a
.Net property assignment. |
java.lang.String |
toString()
Returns a textual representation of this action. |
Methods inherited from class net.sf.smc.SmcElement |
---|
getLineNumber, getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SmcAction(java.lang.String name, int lineNumber)
name
- the action's name should correspond to the
FSM context method.lineNumber
- where the action appears in the .sm
file.public SmcAction(java.lang.String name, int lineNumber, boolean propertyFlag, java.util.List<java.lang.String> arguments) throws java.lang.IllegalArgumentException
name
- the action's name should correspond to the
FSM context method.lineNumber
- where the action appears in the .sm
file.propertyFlag
- if true
, then this action is
a .Net property assignment and arguments
must be
a non-null
list with exactly one item.args
- the action's arguments. May be null
.
java.lang.IllegalArgumentException
- if propertyFlag
is true
and
arguments
is either null
or does not
contain exactly one item.Method Detail |
---|
public boolean isProperty()
true
if this action is a .Net property
assignment and false
if not.
true
if this action is a .Net property
assignment and false
if not.public java.util.List<java.lang.String> getArguments()
null
.
null
.public void setProperty(boolean flag)
flag
is true
, then this action is a
.Net property assignment.
flag
- if true
, then this action is a .Net
property assignment.public void setArguments(java.util.List<java.lang.String> args) throws java.lang.IllegalArgumentException
args
- the action's arguments. May be null
.
java.lang.IllegalArgumentException
- if this is a property action and arguments
is
either null
or does not contain exactly one item.public int compareTo(SmcAction action)
action
.
compareTo
in interface java.lang.Comparable<SmcAction>
action
- comparison action object.
action
.public java.lang.String toString()
toString
in class java.lang.Object
public void accept(SmcVisitor visitor)
accept
in class SmcElement
visitor
- the object implementing the
visit(SmcElement) method.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |