Record Class Violation
java.lang.Object
java.lang.Record
ca.mcscert.jpipe.model.Violation
A single rule violation found during consistency or completeness validation.
rule is a stable kebab-case identifier (e.g.
"no-duplicate-ids") that callers can use for filtering or
localisation. message is a human-readable description.
location is the source position of the offending element, or
SourceLocation.UNKNOWN when the model was built programmatically
without location tracking.
-
Constructor Summary
ConstructorsConstructorDescriptionViolation(String rule, String message, SourceLocation location) Creates an instance of aViolationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.message()Returns the value of themessagerecord component.rule()Returns the value of therulerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Violation
Creates an instance of aViolationrecord class.- Parameters:
rule- the value for therulerecord componentmessage- the value for themessagerecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
rule
Returns the value of therulerecord component.- Returns:
- the value of the
rulerecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-