Package com.puppycrawl.tools.checkstyle
Record Class SarifLogger.RuleKey
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.SarifLogger.RuleKey
- Record Components:
sourceName
- The fully qualified source class name.moduleId
- The module ID from configuration (can be null).
- Enclosing class:
- SarifLogger
Composite key for uniquely identifying a rule by source name and module ID.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for themoduleId
record component.private final String
The field for thesourceName
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.moduleId()
Returns the value of themoduleId
record component.Returns the value of thesourceName
record component.private String
toRuleId()
Converts this key to a SARIF rule ID string.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
sourceName
The field for thesourceName
record component. -
moduleId
The field for themoduleId
record component.
-
-
Constructor Details
-
RuleKey
Creates an instance of aRuleKey
record class.- Parameters:
sourceName
- the value for thesourceName
record componentmoduleId
- the value for themoduleId
record component
-
-
Method Details
-
toRuleId
Converts this key to a SARIF rule ID string.- Returns:
- rule ID in format: sourceName[#moduleId]
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
sourceName
Returns the value of thesourceName
record component.- Returns:
- the value of the
sourceName
record component
-
moduleId
Returns the value of themoduleId
record component.- Returns:
- the value of the
moduleId
record component
-