JML

org.jmlspecs.jmlrac
Interface RacNode

All Known Implementing Classes:
RacParser.RacBlock, RacParser.RacMethodDeclaration, RacParser.RacStatement

public interface RacNode

An abstraction of RAC AST nodes. This type defines a common interface that all RAC AST nodes have to implement. A RAC node is a special form of AST node used to store assertion check code generated by the runtime assertion checker. The idea is to store the generated code in verbatim, intermixed with the regular JML AST nodes, and let visitor objects pretty-print them correctly. Since the only next step after assertion code generation is pretty-printing, we can store the code in verbatim.

Version:
$Revision: 1.3 $
Author:
Yoonsik Cheon
See Also:
RacParser

Method Summary
 void accept(MjcVisitor p)
          Accepts the specified visitor.
 RacNode incrIndent()
          Increments indentation level of this node .
 int indent()
          Returns the current indentation level of this node.
 Iterator iterator()
          Returns an interator that iterates over elements (sequence of RAC nodes) of this node.
 String name()
          Returns the name of this node.
 void setName(String name)
          Sets the name of this node.
 void setVarDecl(PreValueVars.Entry varDecl)
          Sets the variable declaration to be piggyback with this code.
 PreValueVars.Entry varDecl()
          Returns the variable declaration associated with this code.
 

Method Detail

indent

public int indent()
Returns the current indentation level of this node.


incrIndent

public RacNode incrIndent()
Increments indentation level of this node .


iterator

public Iterator iterator()
Returns an interator that iterates over elements (sequence of RAC nodes) of this node.


accept

public void accept(MjcVisitor p)
Accepts the specified visitor. This method implements the Visistor Design Pattern [GoF94].


name

public String name()
Returns the name of this node.


setName

public void setName(String name)
Sets the name of this node.


setVarDecl

public void setVarDecl(PreValueVars.Entry varDecl)
Sets the variable declaration to be piggyback with this code.

See Also:
varDecl()

varDecl

public PreValueVars.Entry varDecl()
Returns the variable declaration associated with this code. This method is used to piggyback a variable declaration with this code.

See Also:
setVarDecl(PreValueVars.Entry)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.