Record Class StringConcatRewriteOutcome
java.lang.Object
java.lang.Record
org.ek9lang.compiler.repair.StringConcatRewriteOutcome
public record StringConcatRewriteOutcome(String status, String modifiedSource, String errorMessage, String metaOutcome, Integer rewrittenLine, Integer operandCount, Integer substitutionCount, Integer escapedBacktickCount, Integer escapedDollarCount, String originalSlice, String rewrittenSlice, List<StringConcatRewriteOutcome.Conflict> conflicts)
extends Record
Outcome of a
StringConcatRewriter call. Three terminal states —
applied, conflicts, error. The metaOutcome
discriminator carries the load-bearing distinction between
"rewritten" (concat replaced with backtick literal) and
"already-in-target-form" (selection was already a backtick or
single double-quoted literal — idempotent no-op).
See docs/tooling/tools/ek9_rewrite_string_concat.md for the
full design (conflict kinds, escape handling, operand admissibility).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne refusal condition.static final record -
Constructor Summary
ConstructorsConstructorDescriptionStringConcatRewriteOutcome(String status, String modifiedSource, String errorMessage, String metaOutcome, Integer rewrittenLine, Integer operandCount, Integer substitutionCount, Integer escapedBacktickCount, Integer escapedDollarCount, String originalSlice, String rewrittenSlice, List<StringConcatRewriteOutcome.Conflict> conflicts) Creates an instance of aStringConcatRewriteOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringConcatRewriteOutcomealreadyInTargetForm(String originalSource, int rewrittenLine) Returns the value of theconflictsrecord component.static StringConcatRewriteOutcomeconflicts(List<StringConcatRewriteOutcome.Conflict> conflicts) final booleanIndicates whether some other object is "equal to" this one.static StringConcatRewriteOutcomeReturns the value of theerrorMessagerecord component.Returns the value of theescapedBacktickCountrecord component.Returns the value of theescapedDollarCountrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themetaOutcomerecord component.Returns the value of themodifiedSourcerecord component.Returns the value of theoperandCountrecord component.Returns the value of theoriginalSlicerecord component.static StringConcatRewriteOutcomerewritten(String modifiedSource, int rewrittenLine, int operandCount, int substitutionCount, int escapedBacktickCount, int escapedDollarCount, String originalSlice, String rewrittenSlice) Returns the value of therewrittenLinerecord component.Returns the value of therewrittenSlicerecord component.status()Returns the value of thestatusrecord component.Returns the value of thesubstitutionCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StringConcatRewriteOutcome
public StringConcatRewriteOutcome(String status, String modifiedSource, String errorMessage, String metaOutcome, Integer rewrittenLine, Integer operandCount, Integer substitutionCount, Integer escapedBacktickCount, Integer escapedDollarCount, String originalSlice, String rewrittenSlice, List<StringConcatRewriteOutcome.Conflict> conflicts) Creates an instance of aStringConcatRewriteOutcomerecord class.- Parameters:
status- the value for thestatusrecord componentmodifiedSource- the value for themodifiedSourcerecord componenterrorMessage- the value for theerrorMessagerecord componentmetaOutcome- the value for themetaOutcomerecord componentrewrittenLine- the value for therewrittenLinerecord componentoperandCount- the value for theoperandCountrecord componentsubstitutionCount- the value for thesubstitutionCountrecord componentescapedBacktickCount- the value for theescapedBacktickCountrecord componentescapedDollarCount- the value for theescapedDollarCountrecord componentoriginalSlice- the value for theoriginalSlicerecord componentrewrittenSlice- the value for therewrittenSlicerecord componentconflicts- the value for theconflictsrecord component
-
-
Method Details
-
rewritten
public static StringConcatRewriteOutcome rewritten(String modifiedSource, int rewrittenLine, int operandCount, int substitutionCount, int escapedBacktickCount, int escapedDollarCount, String originalSlice, String rewrittenSlice) -
alreadyInTargetForm
public static StringConcatRewriteOutcome alreadyInTargetForm(String originalSource, int rewrittenLine) -
conflicts
public static StringConcatRewriteOutcome conflicts(List<StringConcatRewriteOutcome.Conflict> conflicts) -
error
-
toString
-
hashCode
-
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). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
modifiedSource
Returns the value of themodifiedSourcerecord component.- Returns:
- the value of the
modifiedSourcerecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-
metaOutcome
Returns the value of themetaOutcomerecord component.- Returns:
- the value of the
metaOutcomerecord component
-
rewrittenLine
Returns the value of therewrittenLinerecord component.- Returns:
- the value of the
rewrittenLinerecord component
-
operandCount
Returns the value of theoperandCountrecord component.- Returns:
- the value of the
operandCountrecord component
-
substitutionCount
Returns the value of thesubstitutionCountrecord component.- Returns:
- the value of the
substitutionCountrecord component
-
escapedBacktickCount
Returns the value of theescapedBacktickCountrecord component.- Returns:
- the value of the
escapedBacktickCountrecord component
-
escapedDollarCount
Returns the value of theescapedDollarCountrecord component.- Returns:
- the value of the
escapedDollarCountrecord component
-
originalSlice
Returns the value of theoriginalSlicerecord component.- Returns:
- the value of the
originalSlicerecord component
-
rewrittenSlice
Returns the value of therewrittenSlicerecord component.- Returns:
- the value of the
rewrittenSlicerecord component
-
conflicts
Returns the value of theconflictsrecord component.- Returns:
- the value of the
conflictsrecord component
-