com.veromodo.tempo.ast
Class ASTAction

java.lang.Object
  extended by com.veromodo.tempo.ast.ASTNode
      extended by com.veromodo.tempo.ast.ASTAction
All Implemented Interfaces:
Locatable, Resource, ResourceGenre
Direct Known Subclasses:
ASTSignature, ASTTransition

public class ASTAction
extends ASTNode
implements ResourceGenre

Abstract class for the representation of signatures and transitions

Author:
L. Michel

Nested Class Summary
static class ASTAction.Genre
          The type of signature/transition
 
Constructor Summary
ASTAction(ASTAction.Genre g, ASTIdentifier n, ASTListActionFormal f, ASTExpr w)
          Constructor.
 
Method Summary
 ASTListActionFormal getFormals()
          Accessor.
 ASTAction.Genre getGenre()
          Accessor.
 ASTIdentifier getId()
          Accessor.
 java.lang.String getName()
          Accessor.
 ASTExpr getWhere()
          Accessor.
 void visit(ASTIVisitor v)
          Abstract method to traverse the AST via a visitor.
 
Methods inherited from class com.veromodo.tempo.ast.ASTNode
getExtent, setExtent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.veromodo.tempo.util.Resource
getExtent
 

Constructor Detail

ASTAction

public ASTAction(ASTAction.Genre g,
                 ASTIdentifier n,
                 ASTListActionFormal f,
                 ASTExpr w)
Constructor.

Parameters:
g - the genre of a signature/transition (input/output/internal)
n - the name of the action
f - the list of formals
w - the optional 'where clause' that could be attached.
Method Detail

getName

public java.lang.String getName()
Accessor.

Specified by:
getName in interface Resource
Returns:
the name of the action as a string

getId

public ASTIdentifier getId()
Accessor.

Returns:
the name of the action (as a node)

getFormals

public ASTListActionFormal getFormals()
Accessor.

Returns:
the list of formals

getWhere

public ASTExpr getWhere()
Accessor.

Returns:
the optional where clause.

getGenre

public ASTAction.Genre getGenre()
Accessor.

Specified by:
getGenre in interface ResourceGenre
Returns:
the genre of the signature/transition

visit

public void visit(ASTIVisitor v)
Description copied from class: ASTNode
Abstract method to traverse the AST via a visitor.

Specified by:
visit in class ASTNode
Parameters:
v - the visitor interface
See Also:
ASTIVisitor