Class AssertionErrorWithFacts

  • All Implemented Interfaces:
    ErrorWithFacts, java.io.Serializable

    final class AssertionErrorWithFacts
    extends java.lang.AssertionError
    implements ErrorWithFacts
    An AssertionError composed of structured Fact instances and other string messages.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Throwable cause
      Separate cause field, in case initCause() fails.
      (package private) com.google.common.collect.ImmutableList<Fact> facts  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AssertionErrorWithFacts​(com.google.common.collect.ImmutableList<java.lang.String> messages, com.google.common.collect.ImmutableList<Fact> facts, java.lang.Throwable cause)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static AssertionErrorWithFacts create​(com.google.common.collect.ImmutableList<java.lang.String> messages, com.google.common.collect.ImmutableList<Fact> facts, java.lang.Throwable cause)  
      com.google.common.collect.ImmutableList<Fact> facts()  
      java.lang.Throwable getCause()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • facts

        final com.google.common.collect.ImmutableList<Fact> facts
      • cause

        private final java.lang.Throwable cause
        Separate cause field, in case initCause() fails.
    • Constructor Detail

      • AssertionErrorWithFacts

        private AssertionErrorWithFacts​(com.google.common.collect.ImmutableList<java.lang.String> messages,
                                        com.google.common.collect.ImmutableList<Fact> facts,
                                        java.lang.Throwable cause)
    • Method Detail

      • create

        static AssertionErrorWithFacts create​(com.google.common.collect.ImmutableList<java.lang.String> messages,
                                              com.google.common.collect.ImmutableList<Fact> facts,
                                              java.lang.Throwable cause)
      • getCause

        public java.lang.Throwable getCause()
        Overrides:
        getCause in class java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable
      • facts

        public com.google.common.collect.ImmutableList<Fact> facts()
        Specified by:
        facts in interface ErrorWithFacts