Interface TestMethodSink

All Known Implementing Classes:
GitHubAnnotationsEmitter, SarifEmitter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TestMethodSink
Consumer that receives a single discovered test method record.

This functional interface decouples the orchestration layer from the output format. During a scan run, one implementation is created up-front and every discovered test method is forwarded to it via record(java.lang.String, java.lang.String, int, int, java.lang.String, java.util.List<java.lang.String>, java.lang.String, org.egothor.methodatlas.ai.AiMethodSuggestion).

See Also:
  • Method Details

    • record

      void record(String fqcn, String method, int beginLine, int loc, String contentHash, List<String> tags, String displayName, AiMethodSuggestion suggestion)
      Records a single test method.
      Parameters:
      fqcn - fully qualified name of the class that declares the method
      method - simple method name
      beginLine - one-based line number of the first line of the method declaration; 0 when the parser cannot determine the location
      loc - inclusive line count of the method declaration
      contentHash - lowercase-hex SHA-256 fingerprint of the enclosing class source, or null when -content-hash is not enabled
      tags - source-level test-framework tag values declared on the method; never null
      displayName - text from an existing display-name annotation on the method; null when no such annotation is present; "" when the annotation is present but has an empty value — which is a malformed annotation and may be treated as a quality finding by implementations
      suggestion - AI-generated security classification for the method, or null when AI enrichment is disabled or unavailable for this class