org.sourceforge.jemm.weaver.transformation
Class TransformSynchronizedTest

java.lang.Object
  extended by org.sourceforge.jemm.weaver.DefaultTestCase
      extended by org.sourceforge.jemm.weaver.transformation.TransformSynchronizedTest

public class TransformSynchronizedTest
extends DefaultTestCase

Tests TransformSynchronizedTest is able to convert the two bytecodes it is meant to.

Author:
Paul Keeble

Constructor Summary
TransformSynchronizedTest()
           
 
Method Summary
 void executeException()
          Tests a synchronized(this) { throw RuntimeException } and makes sure despite the exception that the
 void executeOnLock()
          Tests the syncyhronized(lock) is converted into calls to beginLock and endLock in the right order.
 void executeOnNested()
          Tests a nested synchronized(this) { syncyhronized(lock) { ...
 void executeOnThis()
          Tests the syncyhronized(this) is converted into calls to beginLock and endLock in the right order.
 void setUp()
           
 void tearDown()
           
 void transform()
          Run the transformation and ensure it works without error
 void transformNested()
           
 
Methods inherited from class org.sourceforge.jemm.weaver.DefaultTestCase
checkedExceptionThrowingConstructorClass, childDummyClass, cleanupClassPool, containedDummyClass, emptyClass, exceptionThrowingConstructorClass, hackClassPath, initialiseClass, initialiseSession, loadClass, methodClass, methodJEMMObjectAccess, referenceArrayClass, referenceClass, synchronizedBlockDummyClass, unconvertedContainedDummyClass, unloadClass, unsupportedDummyClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformSynchronizedTest

public TransformSynchronizedTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

transform

public void transform()
               throws java.lang.Exception
Run the transformation and ensure it works without error

Throws:
java.lang.Exception

transformNested

public void transformNested()
                     throws java.lang.Exception
Throws:
java.lang.Exception

executeOnThis

public void executeOnThis()
                   throws java.lang.Exception
Tests the syncyhronized(this) is converted into calls to beginLock and endLock in the right order.

Throws:
java.lang.Exception

executeOnLock

public void executeOnLock()
                   throws java.lang.Exception
Tests the syncyhronized(lock) is converted into calls to beginLock and endLock in the right order.

Throws:
java.lang.Exception

executeOnNested

public void executeOnNested()
                     throws java.lang.Exception
Tests a nested synchronized(this) { syncyhronized(lock) { ... }} is converted into calls to beginLock, beginLock, endLock and endLock in the right order.

Throws:
java.lang.Exception

executeException

public void executeException()
                      throws java.lang.Exception
Tests a synchronized(this) { throw RuntimeException } and makes sure despite the exception that the

Throws:
java.lang.Exception


Copyright © 2009. All Rights Reserved.