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 aCodeChangingLLMRemediationOutcome
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.fix()
Returns the value of thefix
record component.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.boolean
Whether this outcome should lead to a code change.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CodeChangingLLMRemediationOutcome
Creates an instance of aCodeChangingLLMRemediationOutcome
record class.- Parameters:
key
- the value for thekey
record componentdescription
- the value for thedescription
record componentfix
- the value for thefix
record component
-
-
Method Details
-
shouldApplyCodeChanges
public boolean shouldApplyCodeChanges()Description copied from interface:LLMRemediationOutcome
Whether this outcome should lead to a code change.- Specified by:
shouldApplyCodeChanges
in 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 thekey
record component.- Specified by:
key
in interfaceLLMRemediationOutcome
- Returns:
- the value of the
key
record component
-
description
Returns the value of thedescription
record component.- Specified by:
description
in interfaceLLMRemediationOutcome
- Returns:
- the value of the
description
record component
-
fix
Returns the value of thefix
record component.- Specified by:
fix
in interfaceLLMRemediationOutcome
- Returns:
- the value of the
fix
record component
-