Package org.apache.groovy.contracts

# Class RecursionVariantViolation

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

All Implemented Interfaces:
  `Serializable`

public class RecursionVariantViolation extends AssertionViolation
Thrown when a method-level `Decreases` recursion termination measure fails — either a recursive re-entry did not strictly decrease the measure, or the measure became negative (not well-founded).

Since:
  6.0.0
See Also:
  - `AssertionViolation`
  - `LoopVariantViolation`
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RecursionVariantViolation()`
  Creates a recursion-variant violation without an explicit detail message.
  `RecursionVariantViolation(Object o)`
  Creates a recursion-variant violation with an object-valued detail.

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

  - ### RecursionVariantViolation

    public RecursionVariantViolation()
    Creates a recursion-variant violation without an explicit detail message.

  - ### RecursionVariantViolation

    public RecursionVariantViolation(Object o)
    Creates a recursion-variant violation with an object-valued detail.
    Parameters:
      `o` - the detail object