Class Violations
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.modulith.core.Violations
- All Implemented Interfaces:
Serializable
Value type to gather and report architectural violations.
- Author:
- Oliver Drotbohm
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) Violations
and
(RuntimeException exception) Creates a newViolations
with the givenRuntimeException
added to the current ones?(package private) Violations
(package private) Violations
and
(Violations other) boolean
Returns whether there are violations available.void
Throws itself in case it's not an empty instance.(package private) static Collector<RuntimeException,
?, Violations> Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
NONE
-
-
Method Details
-
toViolations
- Returns:
- will never be null.
-
getMessage
- Overrides:
getMessage
in classThrowable
-
hasViolations
public boolean hasViolations()Returns whether there are violations available.- Returns:
-
throwIfPresent
public void throwIfPresent()Throws itself in case it's not an empty instance. -
and
Creates a newViolations
with the givenRuntimeException
added to the current ones?- Parameters:
exception
- must not be null.- Returns:
-
and
-
and
-