Package org.egothor.methodatlas
The central component of this package is
MethodAtlasApp, a command-line application
that scans Java source trees, identifies JUnit Jupiter test methods, and
emits per-method metadata describing the discovered tests.
Overview
The application traverses one or more directory roots and discovers test
methods via pluggable TestDiscovery
providers. The default JVM provider uses
JavaParser internally; file selection
follows the conventional *Test.java pattern.
For each detected test method the application reports:
- fully-qualified class name (FQCN)
- test method name
- method size measured in lines of code (LOC)
- JUnit
@Tagannotations declared on the method - text of any
@DisplayNameannotation declared on the method
The resulting dataset can be used for test inventory generation, quality metrics, governance reporting, or security analysis of test coverage.
AI-Based Security Tagging
When enabled via command-line options, the application can augment the
extracted test metadata with security classification suggestions produced by
an AI provider. The AI integration is implemented through the
AiSuggestionEngine abstraction located in
the org.egothor.methodatlas.ai package.
In this mode the application sends each discovered test class to the configured AI provider and receives suggested security annotations, such as:
- whether the test validates a security property
- suggested
@DisplayNamedescribing the security intent - taxonomy-based security tags
- optional explanatory reasoning
These suggestions are merged with the source-derived metadata and emitted alongside the standard output fields.
Output Formats
The application supports two output modes:
- CSV (default)
or, when AI enrichment is enabled:fqcn,method,loc,tags,display_namefqcn,method,loc,tags,display_name,ai_security_relevant,ai_display_name,ai_tags,ai_reason,ai_interaction_score - Plain text, enabled using the
-plaincommand-line option
Typical Usage
java -jar methodatlas.jar /path/to/project
java -jar methodatlas.jar -plain /path/to/project
The command scans the specified source directory recursively and emits one output record per detected test method.
Implementation Notes
- Test method discovery is performed by pluggable
TestDiscoveryproviders loaded viaServiceLoader; the JVM provider ships in themethodatlas-discovery-jvmmodule. - Source file write-back is performed by pluggable
SourcePatcherproviders, also loaded viaServiceLoader. - Test detection in the JVM provider is based on JUnit Jupiter annotations
such as
@Test,@ParameterizedTest,@RepeatedTest,@TestFactory, and@TestTemplate.
Sub-packages
org.egothor.methodatlas.api— platform-neutral SPI contracts:TestDiscovery,SourcePatcher,DiscoveredMethod,ScanRecordorg.egothor.methodatlas.discovery.jvm— Java/JVM test discovery implementation (shipped in themethodatlas-discovery-jvmmodule):JavaTestDiscovery,JavaSourcePatcherorg.egothor.methodatlas.discovery.dotnet— C#/.NET test discovery implementation (shipped in themethodatlas-discovery-dotnetmodule):DotNetTestDiscovery,DotNetSourcePatcherorg.egothor.methodatlas.emit— output emitters:OutputEmitter,SarifEmitter,GitHubAnnotationsEmitter,DeltaEmitterorg.egothor.methodatlas.ai— AI suggestion engine and provider integrationsorg.egothor.methodatlas.command— CLI command handler implementations: one class per CLI mode (ScanCommand,SarifCommand,DiffCommand,ApplyTagsCommand,ApplyTagsFromCsvCommand,GitHubAnnotationsCommand,ManualPrepareCommand), plus shared infrastructure inCommandSupport
- See Also:
-
ClassDescriptionIn-memory cache of AI classification results loaded from a previous MethodAtlas scan output.Engine that applies annotation changes to source files driven by a reviewed MethodAtlas CSV export.Applies human-authored classification overrides to AI-generated (or absent) security classification results.A single override entry as stored in the in-memory index.Parsed command-line configuration used to drive a single application run.A single change entry in a MethodAtlas delta report.The type of change represented by a
DeltaEntry.Computes the difference between two MethodAtlas scan outputs.The aggregate result of comparing two MethodAtlas scan outputs.Selects between the two phases of the manual AI workflow.Consume phase: read operator-saved response files and emit enriched CSV.Prepare phase: scan source files and write AI prompt work files and empty response stubs.Command-line application for scanning Java test sources, extracting JUnit test metadata, and optionally enriching the emitted results with AI-generated security tagging suggestions.Output formats supported by the MethodAtlas application.Describes the agreement between a source-level@Tag("security")annotation and the AI classification of the same test method.Consumer that receives a single discovered test method record.