edu.umd.cs.findbugs.ba

Class LockChecker

public class LockChecker extends Object

Front-end for LockDataflow that can avoid doing unnecessary work (e.g., actually performing the lock dataflow) if the method analyzed does not contain explicit monitorenter/monitorexit instructions.

Note that because LockSets use value numbers, ValueNumberAnalysis must be performed for all methods that are synchronized or contain explicit monitorenter/monitorexit instructions.

Author: David Hovemeyer

See Also: LockSet LockDataflow LockAnalysis

Constructor Summary
LockChecker(ClassContext classContext, Method method)
Constructor.
Method Summary
voidexecute()
Execute dataflow analyses (only if required).
LockSetgetFactAtLocation(Location location)
Get LockSet at given Location.

Constructor Detail

LockChecker

public LockChecker(ClassContext classContext, Method method)
Constructor.

Parameters: classContext ClassContext for the class method Method we want LockSets for

Method Detail

execute

public void execute()
Execute dataflow analyses (only if required).

Throws: DataflowAnalysisException CFGBuilderException

getFactAtLocation

public LockSet getFactAtLocation(Location location)
Get LockSet at given Location.

Parameters: location the Location

Returns: the LockSet at that Location

Throws: DataflowAnalysisException

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.