Record Class RedundantThisCheck.RedundantUsage
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.checks.coding.RedundantThisCheck.RedundantUsage
- Record Components:
literalThis- theLITERAL_THIStokenstatement- the enclosing statement, ornullif outside a blockmessageKey- the violation message keyname- the member name following "this"
- Enclosing class:
RedundantThisCheck
private static record RedundantThisCheck.RedundantUsage(DetailAST literalThis, DetailAST statement, String messageKey, String name)
extends Record
A redundant
this usage waiting for a reporting decision.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DetailASTThe field for theliteralThisrecord component.private final StringThe field for themessageKeyrecord component.private final StringThe field for thenamerecord component.private final DetailASTThe field for thestatementrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRedundantUsage(DetailAST literalThis, DetailAST statement, String messageKey, String name) Creates an instance of aRedundantUsagerecord 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.Returns the value of theliteralThisrecord component.Returns the value of themessageKeyrecord component.name()Returns the value of thenamerecord component.Returns the value of thestatementrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
literalThis
The field for theliteralThisrecord component. -
statement
The field for thestatementrecord component. -
messageKey
The field for themessageKeyrecord component. -
name
The field for thenamerecord component.
-
-
Constructor Details
-
RedundantUsage
Creates an instance of aRedundantUsagerecord class.- Parameters:
literalThis- the value for theliteralThisrecord componentstatement- the value for thestatementrecord componentmessageKey- the value for themessageKeyrecord componentname- the value for thenamerecord component
-
-
Method Details
-
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). -
literalThis
Returns the value of theliteralThisrecord component.- Returns:
- the value of the
literalThisrecord component
-
statement
Returns the value of thestatementrecord component.- Returns:
- the value of the
statementrecord component
-
messageKey
Returns the value of themessageKeyrecord component.- Returns:
- the value of the
messageKeyrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-