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:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription(package private) Violations(package private) Violationsand(Violations other) (package private) Violationsand(Violations.Violation violation) Creates a newViolationswith the givenRuntimeExceptionadded to the current ones?Returns all violations' messages.booleanReturns whether there are violations available.voidThrows itself in case it's not an empty instance.(package private) static Collector<Violations.Violation,?, 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:
getMessagein classThrowable
-
getMessages
Returns all violations' messages.- Returns:
- will never be null.
- Since:
- 1.1
-
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 newViolationswith the givenRuntimeExceptionadded to the current ones?- Parameters:
violation- must not be null.- Returns:
-
and
-
and
-