Record Class AnnotatedMethodVisibilityModifierCheck.VisibilityInfo
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.checks.modifier.AnnotatedMethodVisibilityModifierCheck.VisibilityInfo
- Record Components:
visibility- visibility valuenode- AST node where violation should be reported
- Enclosing class:
AnnotatedMethodVisibilityModifierCheck
private static record AnnotatedMethodVisibilityModifierCheck.VisibilityInfo(String visibility, DetailAST node)
extends Record
Record holding visibility information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DetailASTThe field for thenoderecord component.private final StringThe field for thevisibilityrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateVisibilityInfo(String visibility, DetailAST node) Creates an instance of aVisibilityInforecord 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.node()Returns the value of thenoderecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibilityrecord component.
-
Field Details
-
visibility
The field for thevisibilityrecord component. -
node
The field for thenoderecord component.
-
-
Constructor Details
-
VisibilityInfo
Creates an instance of aVisibilityInforecord class.- Parameters:
visibility- the value for thevisibilityrecord componentnode- the value for thenoderecord 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). -
visibility
Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
node
Returns the value of thenoderecord component.- Returns:
- the value of the
noderecord component
-