Package org.apache.groovy.contracts

# Class AssertionViolation

java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.apache.groovy.contracts.AssertionViolation

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `ClassInvariantViolation`, `LoopInvariantViolation`, `LoopVariantViolation`, `PostconditionViolation`, `PreconditionViolation`, `RecursionVariantViolation`

public abstract class AssertionViolation extends AssertionError

Abstract base class for all assertion violations.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AssertionViolation()`
  Creates a violation without an explicit detail message and registers it with the current tracker.
  `protected`
  `AssertionViolation(boolean b)`
  Creates a violation with a boolean detail and registers it with the current tracker.
  `protected`
  `AssertionViolation(char c)`
  Creates a violation with a character detail and registers it with the current tracker.
  `protected`
  `AssertionViolation(double v)`
  Creates a violation with a double-precision detail and registers it with the current tracker.
  `protected`
  `AssertionViolation(float v)`
  Creates a violation with a floating-point detail and registers it with the current tracker.
  `protected`
  `AssertionViolation(int i)`
  Creates a violation with an integer detail and registers it with the current tracker.
  `protected`
  `AssertionViolation(long l)`
  Creates a violation with a long detail and registers it with the current tracker.
  `protected`
  `AssertionViolation(Object o)`
  Creates a violation with an object-valued detail and registers it with the current tracker.

- ## Method Summary

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### AssertionViolation

    protected AssertionViolation()
    Creates a violation without an explicit detail message and registers it with the current tracker.

  - ### AssertionViolation

    protected AssertionViolation(Object o)
    Creates a violation with an object-valued detail and registers it with the current tracker.
    Parameters:
      `o` - the detail object passed to `AssertionError`

  - ### AssertionViolation

    protected AssertionViolation(boolean b)
    Creates a violation with a boolean detail and registers it with the current tracker.
    Parameters:
      `b` - the detail value passed to `AssertionError`

  - ### AssertionViolation

    protected AssertionViolation(char c)
    Creates a violation with a character detail and registers it with the current tracker.
    Parameters:
      `c` - the detail value passed to `AssertionError`

  - ### AssertionViolation

    protected AssertionViolation(int i)
    Creates a violation with an integer detail and registers it with the current tracker.
    Parameters:
      `i` - the detail value passed to `AssertionError`

  - ### AssertionViolation

    protected AssertionViolation(long l)
    Creates a violation with a long detail and registers it with the current tracker.
    Parameters:
      `l` - the detail value passed to `AssertionError`

  - ### AssertionViolation

    protected AssertionViolation(float v)
    Creates a violation with a floating-point detail and registers it with the current tracker.
    Parameters:
      `v` - the detail value passed to `AssertionError`

  - ### AssertionViolation

    protected AssertionViolation(double v)
    Creates a violation with a double-precision detail and registers it with the current tracker.
    Parameters:
      `v` - the detail value passed to `AssertionError`