Class HeldLockAnalyzer
java.lang.Object
com.google.errorprone.bugpatterns.threadsafety.HeldLockAnalyzer
A method body analyzer. Responsible for tracking the set of held locks, and checking accesses to
guarded members.
- Author:
- cushon@google.com (Liam Miller-Cushon)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Utility for discovering the lock expressions that needs to be held when accessing specific guarded members.static interface
Listener interface for accesses to guarded members. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
analyze
(VisitorState state, HeldLockAnalyzer.LockEventListener listener, Predicate<com.sun.source.tree.Tree> isSuppressed, GuardedByFlags flags) Analyzes a method body, tracking the set of held locks and checking accesses to guarded members.
-
Method Details
-
analyze
public static void analyze(VisitorState state, HeldLockAnalyzer.LockEventListener listener, Predicate<com.sun.source.tree.Tree> isSuppressed, GuardedByFlags flags) Analyzes a method body, tracking the set of held locks and checking accesses to guarded members.
-