Record Class UnusedPrivateFieldCheck.FieldUsage
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.checks.coding.UnusedPrivateFieldCheck.FieldUsage
- Record Components:
name- the field name referenced.ancestorFieldMaps- the currently open field maps at the time of the reference, innermost first (index 0).ancestorTypeNames- the currently open type names, parallel toancestorFieldMaps.qualifierTypeName- the type name in aClassName.this.fieldreference, or null if not that form.bareThisQualified- true for athis.fieldreference.
- Enclosing class:
UnusedPrivateFieldCheck
private static record UnusedPrivateFieldCheck.FieldUsage(String name, List<Map<String,DetailAST>> ancestorFieldMaps, List<String> ancestorTypeNames, String qualifierTypeName, boolean bareThisQualified)
extends Record
A recorded, not-yet-resolved reference to a field name, with enough context
to resolve it precisely once the whole file has been visited.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theancestorFieldMapsrecord component.The field for theancestorTypeNamesrecord component.private final booleanThe field for thebareThisQualifiedrecord component.private final StringThe field for thenamerecord component.private final StringThe field for thequalifierTypeNamerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theancestorFieldMapsrecord component.Returns the value of theancestorTypeNamesrecord component.booleanReturns the value of thebareThisQualifiedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thequalifierTypeNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
ancestorFieldMaps
The field for theancestorFieldMapsrecord component. -
ancestorTypeNames
The field for theancestorTypeNamesrecord component. -
qualifierTypeName
The field for thequalifierTypeNamerecord component. -
bareThisQualified
The field for thebareThisQualifiedrecord component.
-
-
Constructor Details
-
FieldUsage
private FieldUsage(String name, List<Map<String, DetailAST>> ancestorFieldMaps, List<String> ancestorTypeNames, String qualifierTypeName, boolean bareThisQualified) Creates an instance of aFieldUsagerecord class.- Parameters:
name- the value for thenamerecord componentancestorFieldMaps- the value for theancestorFieldMapsrecord componentancestorTypeNames- the value for theancestorTypeNamesrecord componentqualifierTypeName- the value for thequalifierTypeNamerecord componentbareThisQualified- the value for thebareThisQualifiedrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
ancestorFieldMaps
Returns the value of theancestorFieldMapsrecord component.- Returns:
- the value of the
ancestorFieldMapsrecord component
-
ancestorTypeNames
Returns the value of theancestorTypeNamesrecord component.- Returns:
- the value of the
ancestorTypeNamesrecord component
-
qualifierTypeName
Returns the value of thequalifierTypeNamerecord component.- Returns:
- the value of the
qualifierTypeNamerecord component
-
bareThisQualified
Returns the value of thebareThisQualifiedrecord component.- Returns:
- the value of the
bareThisQualifiedrecord component
-