View: Method Explorer

Method Explorer View

The Method Explorer View shows you all methods which are called in this test run. For each of those methods, all fields and monitors are shown which are accessed by more than one thread. To get a quick overview, not only the directly accessed fields and monitors are shown but also all fields and monitors which are accessed by methods called by the shown method.

vmlens race conditions view

The picture shows you the Method Explorer View for a run of the following junit test case:

@RunWith(ConcurrentTestRunner.class)
public class WrongAtomicityStack {

private  final Stack<String> stack = new Stack<String>();

@Before
public void addOne() throws Exception
{		
	stack.push("abcd");
}

@Test
public void removeOne() throws Exception
{		
	if( ! stack.isEmpty() )
	{				
		stack.pop();
	}
}
}

It shows the direct write access to the field WrongAtomicityStack.stack together with the indirectly accessed fields and monitors of java.util.Vector. Please note fields declared as final are not shown.

Elements

The view shows you the following elements

Symbol Description Actions
A package
A class
A method Open Declaration
A field or array which is directly and or indirectly read by the method from multiple threads Toggle Waitpoint, for fields: Open Declaration
A field or array which is directly and or indirectly written by the method from multiple threads Toggle Waitpoint, for fields: Open Declaration
A field or array which is directly and or indirectly read and written by the method from multiple threads Toggle Waitpoint, for fields: Open Declaration
A volatile field which is directly and or indirectly read by the method from multiple threads Open Declaration, Toggle Waitpoint
A volatile field which is directly and or indirectly written by the method from multiple threads Open Declaration, Toggle Waitpoint
A volatile field which is directly and or indirectly read and written by the method from multiple threads Open Declaration, Toggle Waitpoint
A volatile field which is directly and or indirectly atomically updated, read and written by the method from multiple threads Open Declaration, Toggle Waitpoint

Related Concepts