Class Violation

java.lang.Object
org.springframework.modulith.core.Violation

public class Violation extends Object
An individual architectural violation.
Since:
1.3.1
Author:
Oliver Drotbohm
  • Field Details

    • message

      final String message
  • Constructor Details

    • Violation

      Violation(String message)
  • Method Details

    • getMessage

      public String getMessage()
      Returns the violation message.
      Returns:
      the message
    • hasMessageContaining

      public boolean hasMessageContaining(String candidate)
      Returns whether the Violation's message contains the given candidate.
      Parameters:
      candidate - must not be null or empty.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object