Class ViolationTracker

java.lang.Object
org.apache.groovy.contracts.ViolationTracker

public class ViolationTracker extends Object

A violation tracker is used to keep a list of pre-, post-condition or class-invariant violations in chronological order. This is necessary to evaluate all parts of a pre- or postcondition, and still being able to rethrow assertion errors.

  • Field Details

  • Constructor Details

    • ViolationTracker

      public ViolationTracker()
  • Method Details

    • init

      public static void init()
    • deinit

      public static void deinit()
    • violationsOccurred

      public static boolean violationsOccurred()
    • rethrowFirst

      public static void rethrowFirst()
    • rethrowLast

      public static void rethrowLast()
    • track

      public void track(AssertionViolation assertionViolation)
    • hasViolations

      public boolean hasViolations()
    • first

      public AssertionViolation first()
    • last

      public AssertionViolation last()