Class ThreadSafety.Violation

  • Enclosing class:
    ThreadSafety

    public abstract static class ThreadSafety.Violation
    extends Object
    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 Detail

      • Violation

        public Violation()
    • Method Detail

      • isPresent

        public boolean isPresent()
        Returns:
        true if a violation was found
      • message

        public String message()
        Returns:
        the explanation
      • path

        public abstract org.pcollections.ConsPStack<String> path()
        The list of steps in the explanation.

        Example: ["Foo has field 'xs' of type 'int[]'", "arrays are not thread-safe"]