Package io.codemodder.plugins.llm
Record Class CodeChangingLLMRemediationOutcome
java.lang.Object
java.lang.Record
io.codemodder.plugins.llm.CodeChangingLLMRemediationOutcome
- All Implemented Interfaces:
LLMRemediationOutcome
public record CodeChangingLLMRemediationOutcome(String key, String description, String fix)
extends Record
implements LLMRemediationOutcome
Models the parameters for a remediation analysis + actual direction for changing the code.
-
Constructor Summary
ConstructorsConstructorDescriptionCodeChangingLLMRemediationOutcome(String key, String description, String fix) Creates an instance of aCodeChangingLLMRemediationOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.fix()Returns the value of thefixrecord component.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.booleanWhether this outcome should lead to a code change.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CodeChangingLLMRemediationOutcome
Creates an instance of aCodeChangingLLMRemediationOutcomerecord class.- Parameters:
key- the value for thekeyrecord componentdescription- the value for thedescriptionrecord componentfix- the value for thefixrecord component
-
-
Method Details
-
shouldApplyCodeChanges
public boolean shouldApplyCodeChanges()Description copied from interface:LLMRemediationOutcomeWhether this outcome should lead to a code change.- Specified by:
shouldApplyCodeChangesin interfaceLLMRemediationOutcome
-
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
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). -
key
Returns the value of thekeyrecord component.- Specified by:
keyin interfaceLLMRemediationOutcome- Returns:
- the value of the
keyrecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceLLMRemediationOutcome- Returns:
- the value of the
descriptionrecord component
-
fix
Returns the value of thefixrecord component.- Specified by:
fixin interfaceLLMRemediationOutcome- Returns:
- the value of the
fixrecord component
-