Class ThreadSafety.Builder

java.lang.Object
com.google.errorprone.bugpatterns.threadsafety.ThreadSafety.Builder
Enclosing class:
ThreadSafety

public abstract static class ThreadSafety.Builder extends Object
Builder for ThreadSafety.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • purpose

      public abstract ThreadSafety.Builder purpose(ThreadSafety.Purpose purpose)
    • markerAnnotationInherited

      public abstract ThreadSafety.Builder markerAnnotationInherited(boolean markerAnnotationInherited)
      Whether to assume the marker annotation is implicitly inherited by subclasses.
    • knownTypes

      public abstract ThreadSafety.Builder knownTypes(ThreadSafetyKnownTypes knownTypes)
      Information about known types and whether they're known to be safe or unsafe.
    • markerAnnotations

      public abstract ThreadSafety.Builder markerAnnotations(Iterable<String> markerAnnotations)
      Annotations that will cause a class to be tested with this ThreadSafety instance; for example, when testing a class for immutability, this should be @Immutable.
    • acceptedAnnotations

      public abstract ThreadSafety.Builder acceptedAnnotations(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.
    • containerOfAnnotation

      public abstract ThreadSafety.Builder containerOfAnnotation(Iterable<String> containerOfAnnotation)
      An annotation which marks a generic parameter as a container type.
    • suppressAnnotation

      public abstract ThreadSafety.Builder suppressAnnotation(Iterable<String> 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

      public final ThreadSafety build(VisitorState state)