Record Class TocMacro.TocContext
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.site.TocMacro.TocContext
- Record Components:
sourceContent- the full template source text.propertyDetails- documented property defaults for this module.repoRoot- repository root, for resolving example file paths.
- Enclosing class:
TocMacro
private static record TocMacro.TocContext(String sourceContent, Map<String,PropertyDetails> propertyDetails, Path repoRoot)
extends Record
Bundles the per-page context needed while writing TOC entries, so
helper methods don't need long parameter lists.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String, PropertyDetails> The field for thepropertyDetailsrecord component.private final PathThe field for therepoRootrecord component.private final StringThe field for thesourceContentrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTocContext(String sourceContent, Map<String, PropertyDetails> propertyDetails, Path repoRoot) Creates an instance of aTocContextrecord 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 thepropertyDetailsrecord component.repoRoot()Returns the value of therepoRootrecord component.Returns the value of thesourceContentrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sourceContent
The field for thesourceContentrecord component. -
propertyDetails
The field for thepropertyDetailsrecord component. -
repoRoot
The field for therepoRootrecord component.
-
-
Constructor Details
-
TocContext
private TocContext(String sourceContent, Map<String, PropertyDetails> propertyDetails, Path repoRoot) Creates an instance of aTocContextrecord class.- Parameters:
sourceContent- the value for thesourceContentrecord componentpropertyDetails- the value for thepropertyDetailsrecord componentrepoRoot- the value for therepoRootrecord 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). -
sourceContent
Returns the value of thesourceContentrecord component.- Returns:
- the value of the
sourceContentrecord component
-
propertyDetails
Returns the value of thepropertyDetailsrecord component.- Returns:
- the value of the
propertyDetailsrecord component
-
repoRoot
Returns the value of therepoRootrecord component.- Returns:
- the value of the
repoRootrecord component
-