Package: org.apache.groovy.contracts

## [Java] Class ViolationTracker

- 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 Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static ThreadLocal<ViolationTracker>` | `INSTANCE` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static void` | `deinit()`
    `` | `public AssertionViolation` | `first()`
    `` | `public boolean` | `hasViolations()`
    `` | `public static void` | `init()`
    `` | `public AssertionViolation` | `last()`
    `` | `public static void` | `rethrowFirst()`
    `` | `public static void` | `rethrowLast()`
    `` | `public void` | `track(AssertionViolation assertionViolation)`
    `` | `public static boolean` | `violationsOccurred()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static ThreadLocal<ViolationTracker> INSTANCE

  - ### Method Detail

    - #### public static void deinit()

    - #### public AssertionViolation first()

    - #### public boolean hasViolations()

    - #### public static void init()

    - #### public AssertionViolation last()

    - #### public static void rethrowFirst()

    - #### public static void rethrowLast()

    - #### public void track(AssertionViolation assertionViolation)

    - #### public static boolean violationsOccurred()