Class ThreadSafety.Builder
java.lang.Object
com.google.errorprone.bugpatterns.threadsafety.ThreadSafety.Builder
- Enclosing class:
ThreadSafety
Builder for
ThreadSafety.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ThreadSafety.BuilderacceptedAnnotations(Iterable<String> acceptedAnnotations) Annotations that do *not* cause a class to be tested, but which are treated as valid annotations to pass the test; for example, if @ThreadSafe is the marker annotation, @Immutable would be included in this list, as an immutable class is by definition thread-safe.abstract ThreadSafety.BuilderacceptedTypeParameterAnnotation(Iterable<String> acceptedTypeParameterAnnotation) An annotation which, when found on a type parameter, indicates that the type parameter may only be instantiated with thread-safe types.final ThreadSafetybuild(VisitorState state) abstract ThreadSafety.BuildercontainerOfAnnotation(Iterable<String> containerOfAnnotation) An annotation which marks a generic parameter as a container type.abstract ThreadSafety.BuilderknownTypes(ThreadSafetyKnownTypes knownTypes) Information about known types and whether they're known to be safe or unsafe.abstract ThreadSafety.BuildermarkerAnnotationInherited(boolean markerAnnotationInherited) Whether to assume the marker annotation is implicitly inherited by subclasses.abstract ThreadSafety.BuildermarkerAnnotations(Iterable<String> markerAnnotations) Annotations that will cause a class to be tested with thisThreadSafetyinstance; for example, when testing a class for immutability, this should be @Immutable.abstract ThreadSafety.Builderpurpose(ThreadSafety.Purpose purpose) SeeThreadSafety.Purpose.abstract ThreadSafety.BuildersuppressAnnotation(Iterable<String> suppressAnnotation) An annotation which, when found on a class, should suppress the testabstract ThreadSafety.BuildertypeParameterAnnotation(Iterable<String> typeParameterAnnotation) An annotation which, when found on a type parameter, indicates that the type parameter may only be instantiated with thread-safe types.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
purpose
SeeThreadSafety.Purpose. -
markerAnnotationInherited
Whether to assume the marker annotation is implicitly inherited by subclasses. -
knownTypes
Information about known types and whether they're known to be safe or unsafe. -
markerAnnotations
Annotations that will cause a class to be tested with thisThreadSafetyinstance; for example, when testing a class for immutability, this should be @Immutable. -
acceptedAnnotations
Annotations that do *not* cause a class to be tested, but which are treated as valid annotations to pass the test; for example, if @ThreadSafe is the marker annotation, @Immutable would be included in this list, as an immutable class is by definition thread-safe. -
containerOfAnnotation
An annotation which marks a generic parameter as a container type. -
suppressAnnotation
An annotation which, when found on a class, should suppress the test -
typeParameterAnnotation
public abstract ThreadSafety.Builder typeParameterAnnotation(Iterable<String> typeParameterAnnotation) An annotation which, when found on a type parameter, indicates that the type parameter may only be instantiated with thread-safe types. -
acceptedTypeParameterAnnotation
public abstract ThreadSafety.Builder acceptedTypeParameterAnnotation(Iterable<String> acceptedTypeParameterAnnotation) An annotation which, when found on a type parameter, indicates that the type parameter may only be instantiated with thread-safe types. -
build
-