Class ThreadSafety.Violation
java.lang.Object
com.google.errorprone.bugpatterns.threadsafety.ThreadSafety.Violation
- Enclosing class:
 ThreadSafety
A human-friendly explanation of a thread safety violations.
An absent explanation indicates either an annotated type with no violations, or a type without the annotation.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadSafety.Violationabsent()An empty explanation.static ThreadSafety.ViolationbooleanReturns true if a violation was found.message()Returns the explanation.static ThreadSafety.ViolationCreates an explanation with one step.abstract org.pcollections.ConsPStack<String> path()The list of steps in the explanation.Adds a step. 
- 
Constructor Details
- 
Violation
public Violation() 
 - 
 - 
Method Details
- 
create
 - 
isPresent
public boolean isPresent()Returns true if a violation was found. - 
message
Returns the explanation. - 
path
The list of steps in the explanation.Example: ["Foo has field 'xs' of type 'int[]'", "arrays are not thread-safe"]
 - 
plus
Adds a step. - 
of
Creates an explanation with one step. - 
absent
An empty explanation. 
 -