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
Abstract base class for all assertion violations.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a violation without an explicit detail message and registers it with the current tracker.protectedAssertionViolation(boolean b) Creates a violation with a boolean detail and registers it with the current tracker.protectedAssertionViolation(char c) Creates a violation with a character detail and registers it with the current tracker.protectedAssertionViolation(double v) Creates a violation with a double-precision detail and registers it with the current tracker.protectedAssertionViolation(float v) Creates a violation with a floating-point detail and registers it with the current tracker.protectedAssertionViolation(int i) Creates a violation with an integer detail and registers it with the current tracker.protectedAssertionViolation(long l) Creates a violation with a long detail and registers it with the current tracker.protectedCreates 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
-
Constructor Details
-
AssertionViolation
protected AssertionViolation()Creates a violation without an explicit detail message and registers it with the current tracker. -
AssertionViolation
Creates a violation with an object-valued detail and registers it with the current tracker.- Parameters:
o- the detail object passed toAssertionError
-
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 toAssertionError
-
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 toAssertionError
-
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 toAssertionError
-
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 toAssertionError
-
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 toAssertionError
-
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 toAssertionError
-