com.google.testing.threadtester
Interface ObjectInstrumentation<T>

Type Parameters:
T - the class that has been instrumented.

public interface ObjectInstrumentation<T>

Contains information about an instance of a class that has been instrumented. Breakpoints can be created in an instrumented object to control the flow of execution.

Author:
alasdair.mackintosh@gmail.com (Alasdair Mackintosh)
See Also:
ClassInstrumentation

Method Summary
 Breakpoint createBreakpoint(CodePosition position, Thread thread)
          Creates a new Breakpoint for the given CodePosition and Thread, both of which must be non-null.
 T getUnderlyingObject()
          Gets the underlying object
 Stepper step(Breakpoint breakpoint)
          Steps to the next executable line from a given breakpoint, assuming that breakpoint has already been reached.
 

Method Detail

getUnderlyingObject

T getUnderlyingObject()
Gets the underlying object


createBreakpoint

Breakpoint createBreakpoint(CodePosition position,
                            Thread thread)
Creates a new Breakpoint for the given CodePosition and Thread, both of which must be non-null. The Breakpoint will only be valid when the CodePosition is reached within the given thread, while operating on the underlying object. (In other words, when 'this' == getUnderlyingObject().


step

Stepper step(Breakpoint breakpoint)
Steps to the next executable line from a given breakpoint, assuming that breakpoint has already been reached. Returns a Stepper that can be used to continue stepping.

Throws:
IllegalThreadStateException - if the given breakpoint has not already been reached.
See Also:
Breakpoint.await()


Copyright © 2013. All Rights Reserved.