jml2b.structure.java
Class VarDeclParser

java.lang.Object
  extended byjml2b.util.Profiler
      extended byjml2b.structure.java.VarDeclParser
All Implemented Interfaces:
Linkable

public class VarDeclParser
extends Profiler
implements Linkable

Parser used for parsing VAR_DECL clauses.

Author:
A. Requet

Field Summary
 
Fields inherited from interface jml2b.link.Linkable
STATE_LINKED, STATE_LINKED_STATEMENTS, STATE_LINKED_TYPE_CHECKED, STATE_UNLINKED
 
Constructor Summary
VarDeclParser()
          Creates a VarDeclParser initialised with the given AST.
VarDeclParser(Modifiers m)
          Creates a new instance using the given modifier for the parsed variables.
 
Method Summary
 Field[] getArray()
          Returns the parsed variables as an array of fields.
 int getFieldCount()
          Returns the number of variables stored in the array.
 java.util.Enumeration getVars()
          Returns an enumeration of the parsed variables.
 void link(IJml2bConfiguration config, LinkContext f)
           
 int linkStatements(IJml2bConfiguration config, LinkContext f)
           
 antlr.collections.AST parse(JmlFile jmlFile, antlr.collections.AST ast)
           
 
Methods inherited from class jml2b.util.Profiler
runGC
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarDeclParser

public VarDeclParser()
Creates a VarDeclParser initialised with the given AST.


VarDeclParser

public VarDeclParser(Modifiers m)
Creates a new instance using the given modifier for the parsed variables.

Parameters:
m - the modifiers that will be used for the parsed variables.
Method Detail

getVars

public java.util.Enumeration getVars()
Returns an enumeration of the parsed variables.

Returns:
Enumeration an enumeration of the parsed variables. The enumerated elements are of type Field
See Also:
Field

getArray

public Field[] getArray()
Returns the parsed variables as an array of fields.

Returns:
Field[] The parsed variables.

getFieldCount

public int getFieldCount()
Returns the number of variables stored in the array.

Returns:
the number of parsed variables.

parse

public antlr.collections.AST parse(JmlFile jmlFile,
                                   antlr.collections.AST ast)
                            throws Jml2bException
Throws:
Jml2bException

link

public void link(IJml2bConfiguration config,
                 LinkContext f)
          throws Jml2bException
Specified by:
link in interface Linkable
Throws:
Jml2bException

linkStatements

public int linkStatements(IJml2bConfiguration config,
                          LinkContext f)
                   throws Jml2bException
Specified by:
linkStatements in interface Linkable
Throws:
Jml2bException