|
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
net.sf.smc.model.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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.smc.model.SmcElement |
---|
SmcElement.TransType |
Field Summary |
---|
Fields inherited from class net.sf.smc.model.SmcElement |
---|
_lineNumber, _name, NIL_STATE |
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 |
isEmptyStateStack()
Returns true if this action is the predefined EmptyStateStack()
Returns false if this action is not the predefined EmptyStateStack() |
boolean |
isProperty()
Returns true if this action is a .Net property
assignment and false if not. |
boolean |
isStatic()
Returns true if this action is a static member. |
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.model.SmcElement |
---|
getLineNumber, getName, merge |
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.arguments
- 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 void accept(SmcVisitor visitor)
accept
in class SmcElement
visitor
- the object implementing the
visit(SmcElement) method.public int compareTo(SmcAction action)
action
.
The comparison is based on the action name and arguments.
compareTo
in interface java.lang.Comparable<SmcAction>
action
- comparison action object.
action
.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 boolean isStatic()
true
if this action is a static member.
Returns false
if this action is an instance member.
public boolean isEmptyStateStack()
true
if this action is the predefined EmptyStateStack()
Returns false
if this action is not the predefined EmptyStateStack()
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 java.lang.String toString()
toString
in class java.lang.Object
|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |