avrora.monitors
Class StackMonitor

java.lang.Object
  extended byavrora.util.help.HelpCategory
      extended byavrora.monitors.MonitorFactory
          extended byavrora.monitors.StackMonitor
All Implemented Interfaces:
HelpItem

public class StackMonitor
extends MonitorFactory

The StackMonitor class is a monitor that tracks the height of the program's stack over the execution of the simulation and reports the maximum stack of the program.


Nested Class Summary
 class StackMonitor.Monitor
          The Monitor class implements a monitor for the stack height that inserts a probe after every instruction in the program and checks the stack height after each instruction is executed.
 
Field Summary
 
Fields inherited from class avrora.monitors.MonitorFactory
options
 
Fields inherited from class avrora.util.help.HelpCategory
COMPARATOR, help, name
 
Constructor Summary
StackMonitor()
          The constructor for the StackMonitor class builds a new MonitorFactory capable of creating monitors for each Simulator instance passed to the newMonitor() method.
 
Method Summary
 Monitor newMonitor(Simulator s)
          The newMonitor() method creates a new monitor that is capable of monitoring the stack height of the program over its execution.
 
Methods inherited from class avrora.monitors.MonitorFactory
processOptions
 
Methods inherited from class avrora.util.help.HelpCategory
addCommandExample, addListSection, addOptionSection, addSection, addSubcategorySection, getHelp, getName, printHelp, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackMonitor

public StackMonitor()
The constructor for the StackMonitor class builds a new MonitorFactory capable of creating monitors for each Simulator instance passed to the newMonitor() method.

Method Detail

newMonitor

public Monitor newMonitor(Simulator s)
The newMonitor() method creates a new monitor that is capable of monitoring the stack height of the program over its execution.

Specified by:
newMonitor in class MonitorFactory
Parameters:
s - the simulator to create a monitor for
Returns:
an instance of the Monitor interface for the specified simulator