org.sourceforge.jemm.weaver.domain
Class SynchronizedBlockDummy

java.lang.Object
  extended by org.sourceforge.jemm.weaver.domain.SynchronizedBlockDummy
All Implemented Interfaces:
org.sourceforge.jemm.util.JEMMObject

public class SynchronizedBlockDummy
extends java.lang.Object
implements org.sourceforge.jemm.util.JEMMObject

A Dummy class for testing synchronous blocks.

Author:
Paul Keeble

Field Summary
protected  org.sourceforge.jemm.lifecycle.ShadowUserObject jemmOIF
           
 
Constructor Summary
SynchronizedBlockDummy()
          Create a SynchronizedBlockDummy.
SynchronizedBlockDummy(org.sourceforge.jemm.lifecycle.ShadowUserObject obj)
          Create a SynchronizedBlockDummy with the given shadow object.
 
Method Summary
 int getOnLock()
          Returns the current value of the onLock counter.
 int getOnThis()
          Returns the current value of the onThis counter.
 void onException()
          Method containing a synchronised block on 'this' which throws an exception within the block.
 void onLock()
          Simple synchronized block on the 'lock' object.
 void onLockConvert()
          The code weaving equivalent version of onLock().
 void onNested()
          Method containing a nested pair of synchronised block on 'this' and 'lock'.
 void onNestedConvert()
          The code weaving equivalent version of onNested().
 void onNestedException()
          Test method that throws an exception with a nested synchronisation block.
 void onThis()
          Method containing a synchronised block on 'this'.
 void onThisConvert()
          The code weaving equivalent version of onThis().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jemmOIF

protected org.sourceforge.jemm.lifecycle.ShadowUserObject jemmOIF
Constructor Detail

SynchronizedBlockDummy

public SynchronizedBlockDummy()
Create a SynchronizedBlockDummy.


SynchronizedBlockDummy

public SynchronizedBlockDummy(org.sourceforge.jemm.lifecycle.ShadowUserObject obj)
Create a SynchronizedBlockDummy with the given shadow object.

Parameters:
obj - The underlying shadow object.
Method Detail

onThis

public void onThis()
Method containing a synchronised block on 'this'.


onNested

public void onNested()
Method containing a nested pair of synchronised block on 'this' and 'lock'.


onException

public void onException()
Method containing a synchronised block on 'this' which throws an exception within the block.


onNestedException

public void onNestedException()
Test method that throws an exception with a nested synchronisation block.


onThisConvert

public void onThisConvert()
The code weaving equivalent version of onThis().


onNestedConvert

public void onNestedConvert()
The code weaving equivalent version of onNested().


onLock

public void onLock()
Simple synchronized block on the 'lock' object.


onLockConvert

public void onLockConvert()
The code weaving equivalent version of onLock().


getOnThis

public int getOnThis()
Returns the current value of the onThis counter.

Returns:
The current value of the onThis counter.

getOnLock

public int getOnLock()
Returns the current value of the onLock counter.

Returns:
The current value of the onLock counter.


Copyright © 2009. All Rights Reserved.