Class ThreadSafety.Builder

    • Method Detail

      • markerAnnotations

        public ThreadSafety.Builder markerAnnotations​(Set<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.
      • markerAnnotations

        public ThreadSafety.Builder markerAnnotations​(com.google.common.collect.ImmutableSet<String> markerAnnotations)
      • acceptedAnnotations

        public ThreadSafety.Builder acceptedAnnotations​(Set<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.
      • acceptedAnnotations

        public ThreadSafety.Builder acceptedAnnotations​(com.google.common.collect.ImmutableSet<String> acceptedAnnotations)
      • containerOfAnnotation

        public ThreadSafety.Builder containerOfAnnotation​(Class<? extends Annotation> containerOfAnnotation)
        An annotation which marks a generic parameter as a container type.
      • suppressAnnotation

        public ThreadSafety.Builder suppressAnnotation​(Class<? extends Annotation> suppressAnnotation)
        An annotation which, when found on a class, should suppress the test
      • typeParameterAnnotation

        public ThreadSafety.Builder typeParameterAnnotation​(Class<? extends Annotation> typeParameterAnnotation)
        An annotation which, when found on a type parameter, indicates that the type parameter may only be instantiated with thread-safe types.