Record Class SplicePlan.Edit
java.lang.Object
java.lang.Record
io.jenkins.plugins.configsplice.engine.SplicePlan.Edit
- Record Components:
range- the exact source range of the existing scalar tokenreplacement- already-serialised replacement text for this context (JSON literal, or XML-escaped attribute content)label- a value-free identifier used only in diagnostics, typically the property path
- Enclosing class:
SplicePlan
public static record SplicePlan.Edit(SourceRange range, String replacement, String label)
extends Record
One replacement.
-
Constructor Summary
ConstructorsConstructorDescriptionEdit(SourceRange range, String replacement, String label) Creates an instance of aEditrecord 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.label()Returns the value of thelabelrecord component.range()Returns the value of therangerecord component.Returns the value of thereplacementrecord component.toString()Masks the replacement text.
-
Constructor Details
-
Edit
Creates an instance of aEditrecord class.- Parameters:
range- the value for therangerecord componentreplacement- the value for thereplacementrecord componentlabel- the value for thelabelrecord component
-
-
Method Details
-
toString
Masks the replacement text.A record's generated
toString()prints every component, so the default would put a resolved credential into any log statement, assertion message or debugger label that touched an edit. Overriding it makes that leak impossible rather than merely forbidden (ADR-003). -
hashCode
public final int 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). -
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
replacement
Returns the value of thereplacementrecord component.- Returns:
- the value of the
replacementrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-