|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.testing.threadtester.Instrumentation<T>
T - the class being instrumentedpublic class Instrumentation<T>
Factory for obtaining instrumented classes and objects. In order for
instrumentation to be enabled, the classes must have been loaded
via a special classloader, so that the necessary data can be added
to the class' bytecode. The easiest way to do this is to run all
tests via a threaded test runner.
ClassInstrumentation,
ObjectInstrumentation,
BaseThreadedTestRunner,
TestInstrumenter,
InstrumentedClassLoader| Method Summary | ||
|---|---|---|
static
|
getClassInstrumentation(Class<T> clss)
Returns the ClassInstrumentation corresponding to a given
class. |
|
static
|
getClassInstrumentationForObject(T underlyingObject)
Returns the ClassInstrumentation corresponding to the class of the
given object. |
|
static
|
getNamedClassInstrumentation(String classname)
Returns the ClassInstrumentation corresponding to a given
classname. |
|
static
|
getObjectInstrumentation(T underlyingObject)
Returns the ObjectInstrumentation corresponding to a given
object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> ObjectInstrumentation<T> getObjectInstrumentation(T underlyingObject)
ObjectInstrumentation corresponding to a given
object. Note that this method always returns the same result for a given
object - i.e. there is a one-to-one mapping from ObjectInstrumentation to
underlying object.
IllegalArgumentException - if the object's class has not been
instrumented.public static <T> ClassInstrumentation getClassInstrumentation(Class<T> clss)
ClassInstrumentation corresponding to a given
class. Note that this method always returns the same result for a given
class - i.e. there is a one-to-one mapping from a ClassInstrumentation to a
class.
IllegalArgumentException - if the class has not been instrumented.public static <T> ClassInstrumentation getNamedClassInstrumentation(String classname)
ClassInstrumentation corresponding to a given
classname. Note that this method always returns the same result for a given
class - i.e. there is a one-to-one mapping from ClassInstrumentation to
class.
IllegalArgumentException - if the class has not been instrumented.public static <T> ClassInstrumentation getClassInstrumentationForObject(T underlyingObject)
ClassInstrumentation corresponding to the class of the
given object. Note that this method always returns the same result for a
given class - i.e. there is a one-to-one mapping from ClassInstrumentation
to class.
IllegalArgumentException - if the class has not been instrumented.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||