Package ai.narrativetrace.gradle
Record Class ClarityScenarioResult
java.lang.Object
java.lang.Record
ai.narrativetrace.gradle.ClarityScenarioResult
public record ClarityScenarioResult(String name, double overallScore, double methodNameScore, double classNameScore, double parameterNameScore, double structuralScore, double cohesionScore, List<ClarityScenarioResult.Issue> issues)
extends Record
Gradle-plugin-side view of one clarity scenario result.
INTENT: Represents parsed JSON results without depending on the clarity module's runtime classes.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionClarityScenarioResult(String name, double overallScore, double methodNameScore, double classNameScore, double parameterNameScore, double structuralScore, double cohesionScore, List<ClarityScenarioResult.Issue> issues) Creates an instance of aClarityScenarioResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theclassNameScorerecord component.doubleReturns the value of thecohesionScorerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.issues()Returns the value of theissuesrecord component.doubleReturns the value of themethodNameScorerecord component.name()Returns the value of thenamerecord component.doubleReturns the value of theoverallScorerecord component.doubleReturns the value of theparameterNameScorerecord component.doubleReturns the value of thestructuralScorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClarityScenarioResult
public ClarityScenarioResult(String name, double overallScore, double methodNameScore, double classNameScore, double parameterNameScore, double structuralScore, double cohesionScore, List<ClarityScenarioResult.Issue> issues) Creates an instance of aClarityScenarioResultrecord class.- Parameters:
name- the value for thenamerecord componentoverallScore- the value for theoverallScorerecord componentmethodNameScore- the value for themethodNameScorerecord componentclassNameScore- the value for theclassNameScorerecord componentparameterNameScore- the value for theparameterNameScorerecord componentstructuralScore- the value for thestructuralScorerecord componentcohesionScore- the value for thecohesionScorerecord componentissues- the value for theissuesrecord 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
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
overallScore
public double overallScore()Returns the value of theoverallScorerecord component.- Returns:
- the value of the
overallScorerecord component
-
methodNameScore
public double methodNameScore()Returns the value of themethodNameScorerecord component.- Returns:
- the value of the
methodNameScorerecord component
-
classNameScore
public double classNameScore()Returns the value of theclassNameScorerecord component.- Returns:
- the value of the
classNameScorerecord component
-
parameterNameScore
public double parameterNameScore()Returns the value of theparameterNameScorerecord component.- Returns:
- the value of the
parameterNameScorerecord component
-
structuralScore
public double structuralScore()Returns the value of thestructuralScorerecord component.- Returns:
- the value of the
structuralScorerecord component
-
cohesionScore
public double cohesionScore()Returns the value of thecohesionScorerecord component.- Returns:
- the value of the
cohesionScorerecord component
-
issues
Returns the value of theissuesrecord component.- Returns:
- the value of the
issuesrecord component
-