Interface ErrorCollector

    • Method Detail

      • addError

        void addError​(VerificationError error)
        Records an error.
        Parameters:
        error - the error to record
      • addWarning

        void addWarning​(VerificationError warning)
        Records a warning.
        Parameters:
        warning - the warning to record
      • hasErrors

        boolean hasErrors()
        Returns:
        true when at least one error has been recorded
      • hasWarnings

        boolean hasWarnings()
        Returns:
        true when at least one warning has been recorded
      • shouldStop

        boolean shouldStop()
        Returns:
        true when verification should give up rather than report further errors
      • reset

        void reset()
        Discards every recorded error and warning.
      • failFast

        static ErrorCollector failFast()
        Returns:
        a collector that keeps only the first error and stops verification there
      • collectAll

        static ErrorCollector collectAll​(int maxErrors)
        Creates a collector that gathers errors up to a cap.
        Parameters:
        maxErrors - the number of errors to retain before stopping
        Returns:
        the collector
      • forConfig

        static ErrorCollector forConfig​(VerifierConfig config)
        Creates the collector a verifier configuration asks for.
        Parameters:
        config - the verifier configuration
        Returns:
        a fail-fast collector when the config requests one, otherwise a capped collect-all collector