sofya.apps.atomicity
Class ResultCollector

java.lang.Object
  extended by sofya.apps.atomicity.ResultCollector

public class ResultCollector
extends java.lang.Object

Records the results of atomicity checking on methods invoked in the monitored program.

Version:
06/14/2005
Author:
Alex Kinneer

Constructor Summary
ResultCollector()
          Creates a new result collector.
 
Method Summary
 void add(MethodSignature mSig, boolean atomic)
          Add the result of an atomicity check for an invocation of a given method.
 boolean get(MethodSignature mSig)
          Checks whether a method was found to be atomic.
 MethodSignature[] getMethods()
          Gets the list of methods for which atomicity results are available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultCollector

public ResultCollector()
Creates a new result collector.

Method Detail

add

public void add(MethodSignature mSig,
                boolean atomic)
Add the result of an atomicity check for an invocation of a given method.

Parameters:
mSig - Signature of the invoked method.
atomic - Boolean specifying whether the invocation was found to be atomic or non-atomic.

get

public boolean get(MethodSignature mSig)
Checks whether a method was found to be atomic.

Returns:
true if the method was found to be atomic on all invocations, false otherwise. This method will also return false if the method was not invoked.

getMethods

public MethodSignature[] getMethods()
Gets the list of methods for which atomicity results are available.

Returns:
An array of signatures of methods for which the atomicity property has been checked and stored.