Record Class RuleMetadata
java.lang.Object
java.lang.Record
dev.archunitjava.result.RuleMetadata
- All Implemented Interfaces:
Comparable<RuleMetadata>
public record RuleMetadata(String semanticIdentity, String presentationIdentity, String displayName, String description, Optional<String> rationale, List<String> tags, Severity severity)
extends Record
implements Comparable<RuleMetadata>
Immutable rule metadata carried losslessly into every result and renderer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPresentation-only alias; the semantic identity remains unchanged.intcompareTo(RuleMetadata other) Returns the value of thedescriptionrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Human-ready wording; escaping remains the renderer's responsibility.static RuleMetadataReturns the value of thepresentationIdentityrecord component.Returns the value of therationalerecord component.Returns the value of thesemanticIdentityrecord component.severity()Returns the value of theseverityrecord component.tagged(Collection<String> values) tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.withSeverity(Severity value)
-
Constructor Details
-
RuleMetadata
public RuleMetadata(String semanticIdentity, String presentationIdentity, String displayName, String description, Optional<String> rationale, List<String> tags, Severity severity) Creates an instance of aRuleMetadatarecord class.- Parameters:
semanticIdentity- the value for thesemanticIdentityrecord componentpresentationIdentity- the value for thepresentationIdentityrecord componentdisplayName- the value for thedisplayNamerecord componentdescription- the value for thedescriptionrecord componentrationale- the value for therationalerecord componenttags- the value for thetagsrecord componentseverity- the value for theseverityrecord component
-
-
Method Details
-
of
-
as
Presentation-only alias; the semantic identity remains unchanged. -
because
-
tagged
-
tagged
-
withSeverity
-
humanDescription
Human-ready wording; escaping remains the renderer's responsibility. -
compareTo
- Specified by:
compareToin interfaceComparable<RuleMetadata>
-
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). -
semanticIdentity
Returns the value of thesemanticIdentityrecord component.- Returns:
- the value of the
semanticIdentityrecord component
-
presentationIdentity
Returns the value of thepresentationIdentityrecord component.- Returns:
- the value of the
presentationIdentityrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
rationale
-
tags
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-