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 SummaryFields
- 
Method SummaryModifier and TypeMethodDescription(package private) Violationsand(RuntimeException exception) Creates a newViolationswith the givenRuntimeExceptionadded to the current ones?(package private) Violations(package private) Violationsand(Violations other) Returns all violations' messages.booleanReturns whether there are violations available.voidThrows itself in case it's not an empty instance.(package private) static Collector<RuntimeException,?, Violations> Methods inherited from class java.lang.ThrowableaddSuppressed, 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 class- Throwable
 
- 
getMessagesReturns all violations' messages.- Returns:
- will never be null.
- Since:
- 1.1
 
- 
hasViolationspublic boolean hasViolations()Returns whether there are violations available.- Returns:
 
- 
throwIfPresentpublic void throwIfPresent()Throws itself in case it's not an empty instance.
- 
andCreates a newViolationswith the givenRuntimeExceptionadded to the current ones?- Parameters:
- exception- must not be null.
- Returns:
 
- 
and
- 
and
 
-