Record Class AiClassSuggestion

java.lang.Object
java.lang.Record
org.egothor.methodatlas.ai.AiClassSuggestion
Record Components:
className - simple or fully qualified class name reported by the AI; may be null if omitted by the provider response
classSecurityRelevant - whether the class as a whole is considered security-relevant; may be null when the AI does not provide a class-level decision
classTags - class-level security tags suggested by the AI; may be empty or null depending on response normalization
classReason - explanatory rationale for the class-level classification; may be null
methods - method-level suggestions produced for individual test methods; may be empty or null depending on response normalization

public record AiClassSuggestion(String className, Boolean classSecurityRelevant, List<String> classTags, String classReason, List<AiMethodSuggestion> methods) extends Record
Immutable AI-generated classification result for a single parsed test class.

This record represents the structured output returned by an AI suggestion engine after analyzing the source of one JUnit test class. It contains both optional class-level security classification data and method-level suggestions for individual test methods declared within the class.

Class-level fields describe whether the class as a whole appears to be security-relevant and, if so, which aggregate tags or rationale apply. Method-level results are provided separately through methods() and are typically used by the calling code as the primary source for per-method enrichment of emitted scan results.

Instances of this record are commonly deserialized from provider-specific AI responses after normalization into the application's internal result model.

See Also:
  • Constructor Details

    • AiClassSuggestion

      public AiClassSuggestion(String className, Boolean classSecurityRelevant, List<String> classTags, String classReason, List<AiMethodSuggestion> methods)
      Creates an instance of a AiClassSuggestion record class.
      Parameters:
      className - the value for the className record component
      classSecurityRelevant - the value for the classSecurityRelevant record component
      classTags - the value for the classTags record component
      classReason - the value for the classReason record component
      methods - the value for the methods record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • classSecurityRelevant

      public Boolean classSecurityRelevant()
      Returns the value of the classSecurityRelevant record component.
      Returns:
      the value of the classSecurityRelevant record component
    • classTags

      public List<String> classTags()
      Returns the value of the classTags record component.
      Returns:
      the value of the classTags record component
    • classReason

      public String classReason()
      Returns the value of the classReason record component.
      Returns:
      the value of the classReason record component
    • methods

      public List<AiMethodSuggestion> methods()
      Returns the value of the methods record component.
      Returns:
      the value of the methods record component