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

public abstract class AssertionViolation extends AssertionError

Abstract base class for all assertion violations.

See Also:
  • 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