Uses of Class
com.google.errorprone.bugpatterns.threadsafety.ThreadSafety.Violation
Packages that use ThreadSafety.Violation
-
Uses of ThreadSafety.Violation in com.google.errorprone.bugpatterns.threadsafety
Methods in com.google.errorprone.bugpatterns.threadsafety that return ThreadSafety.ViolationModifier and TypeMethodDescriptionstatic ThreadSafety.Violation
ThreadSafety.Violation.absent()
An empty explanation.ImmutableAnalysis.checkForImmutability
(Optional<com.sun.source.tree.ClassTree> tree, com.google.common.collect.ImmutableSet<String> immutableTyParams, com.sun.tools.javac.code.Type.ClassType type, ImmutableAnalysis.ViolationReporter reporter) Check that an@Immutable
-annotated class: does not declare or inherit any mutable fields, any immutable supertypes are instantiated with immutable type arguments as required by their containerOf spec, and any enclosing instances are immutable.ThreadSafeAnalysis.checkForThreadSafety
(Optional<com.sun.source.tree.ClassTree> tree, com.google.common.collect.ImmutableSet<String> threadSafeTypeParams, com.sun.tools.javac.code.Type.ClassType type) Check that an@ThreadSafe
-annotated class: does not declare or inherit any fields which are not thread safe, any threadsafe supertypes are instantiated with threadsafe type arguments as required by their containerOf spec, and any enclosing instances are threadsafe.ThreadSafety.checkInstantiation
(com.sun.tools.javac.code.Symbol.TypeVariableSymbol typeParameter, Collection<com.sun.tools.javac.code.Type> instantiations) Checks that any thread-safe type parameters are instantiated with thread-safe types.ThreadSafety.checkInstantiation
(Collection<com.sun.tools.javac.code.Symbol.TypeVariableSymbol> typeParameters, Collection<com.sun.tools.javac.code.Type> typeArguments) ImmutableAnalysis.checkInvocation
(com.sun.tools.javac.code.Type methodType, com.sun.tools.javac.code.Symbol symbol) ThreadSafeAnalysis.checkInvocation
(com.sun.tools.javac.code.Type methodType, com.sun.tools.javac.code.Symbol symbol) ThreadSafety.checkInvocation
(com.sun.tools.javac.code.Type methodType, com.sun.tools.javac.code.Symbol symbol) Checks the instantiation of any thread-safe type parameters in the current invocation.ThreadSafety.checkSuperInstantiation
(Set<String> containerTypeParameters, AnnotationInfo annotation, com.sun.tools.javac.code.Type type) Check that the super-type of a@ThreadSafe
-annotated type is instantiated with threadsafe type arguments where required by its annotation's containerOf element, and that any type arguments that correspond to containerOf type parameters on the sub-type are also in the super-type's containerOf spec.static ThreadSafety.Violation
ThreadSafety.isThreadSafeType
(boolean allowContainerTypeParameters, Set<String> containerTypeParameters, com.sun.tools.javac.code.Type type) Returns anThreadSafety.Violation
explaining whether the type is threadsafe.static ThreadSafety.Violation
Creates an explanation with one step.Adds a step.ThreadSafety.threadSafeInstantiation
(Set<String> containerTypeParameters, AnnotationInfo annotation, com.sun.tools.javac.code.Type type) Check that a type-use of an@ThreadSafe
-annotated type is instantiated with threadsafe type arguments where required by its annotation's containerOf element.ThreadSafety.threadSafeInstantiation
(Set<String> containerTypeParameters, AnnotationInfo annotation, com.sun.tools.javac.code.Type type, Set<com.sun.tools.javac.code.Symbol.TypeVariableSymbol> recursiveThreadSafeTypeParameter) Methods in com.google.errorprone.bugpatterns.threadsafety with parameters of type ThreadSafety.ViolationModifier and TypeMethodDescriptionImmutableAnalysis.ViolationReporter.describe
(com.sun.source.tree.Tree tree, ThreadSafety.Violation info) default Description
ImmutableAnalysis.ViolationReporter.report
(com.sun.source.tree.Tree tree, ThreadSafety.Violation info, Optional<SuggestedFix> suggestedFix)