jml2b.link
Class VarStack

java.lang.Object
  extended byjml2b.util.Profiler
      extended byjml2b.link.VarStack

public class VarStack
extends Profiler

This class implements a stack containing sets of fields. It is used in the context during the link.

Author:
A. Requet

Constructor Summary
VarStack()
          Creates a new empty stack.
 
Method Summary
 void add(Field f)
          Add a field to the set on the top of the stack.
 void add(java.util.Vector v)
          Add a new set of fields to the top of the stack.
 java.util.Enumeration elements()
          Returns the elements of the stack.
 boolean empty()
          Returns whether the stack is empty or not.
 Field getField(java.lang.String name)
          Return the field with the given name.
 void popVars()
          Remove the elem�ent at the top of the stack.
 void pushVars()
          Create a new empty set of fields at the top of the stack.
 java.util.Vector top()
          Returns the top of the stack.
 
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

VarStack

public VarStack()
Creates a new empty stack.

Method Detail

add

public void add(java.util.Vector v)
Add a new set of fields to the top of the stack.

Parameters:
v - The set of field to add to the current block

add

public void add(Field f)
Add a field to the set on the top of the stack.

Parameters:
f - The field to add.

pushVars

public void pushVars()
Create a new empty set of fields at the top of the stack.


popVars

public void popVars()
Remove the elem�ent at the top of the stack.


empty

public boolean empty()
Returns whether the stack is empty or not.


getField

public Field getField(java.lang.String name)
Return the field with the given name. null if the field is not found

Parameters:
name - The name of the field
Returns:

top

public java.util.Vector top()
Returns the top of the stack.

Returns:

elements

public java.util.Enumeration elements()
Returns the elements of the stack.

Returns: