Record Class AiMethodSuggestion
- Record Components:
methodName- name of the analyzed test method as reported by the AIsecurityRelevant-trueif the AI classified the test as validating a security propertydisplayName- suggested@DisplayNamevalue describing the security intent of the test; may benull- taxonomy-based security tags suggested for the test method; may be empty ornulldepending on provider responsereason- explanatory rationale describing why the method was classified as security-relevant or why specific tags were assigned; may benullconfidence- AI confidence score in the range[0.0, 1.0]describing how certain the model is that the method is security-relevant;0.0when the AI did not provide a confidence score or whensecurityRelevantisfalse
This record represents the normalized method-level output returned by an
AiSuggestionEngine after analyzing the
source of a JUnit test class. Each instance describes the AI's interpretation
of the security relevance and taxonomy classification of one test method.
The classification data contained in this record is typically produced by an external AI provider and normalized by the application's AI integration layer before being returned to the scanning logic. The resulting values are then merged with source-derived metadata during output generation.
The fields of this record correspond to the security analysis dimensions used
by the MethodAtlasApp enrichment pipeline:
- whether the test method validates a security property
- a suggested
@DisplayNamedescribing the security intent - taxonomy-based security tags associated with the test
- a short explanatory rationale describing the classification
Instances of this record are typically stored in a
SuggestionLookup and retrieved using the
method name as the lookup key when emitting enriched scan results.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theconfidencerecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themethodNamerecord component.reason()Returns the value of thereasonrecord component.booleanReturns the value of thesecurityRelevantrecord component.tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiMethodSuggestion
public AiMethodSuggestion(String methodName, boolean securityRelevant, String displayName, List<String> tags, String reason, double confidence) Creates an instance of aAiMethodSuggestionrecord class.- Parameters:
methodName- the value for themethodNamerecord componentsecurityRelevant- the value for thesecurityRelevantrecord componentdisplayName- the value for thedisplayNamerecord componenttags- the value for thetagsrecord componentreason- the value for thereasonrecord componentconfidence- the value for theconfidencerecord 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 '=='. -
methodName
Returns the value of themethodNamerecord component.- Returns:
- the value of the
methodNamerecord component
-
securityRelevant
public boolean securityRelevant()Returns the value of thesecurityRelevantrecord component.- Returns:
- the value of the
securityRelevantrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-