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, parses Java source
files using the JavaParser library, and
extracts information about test methods declared in classes whose file names
follow 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
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,tagsfqcn,method,loc,tags,ai_security_relevant,ai_display_name,ai_tags,ai_reason - 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
- Parsing is performed using
JavaParser(instance API, not the static singleton). - Test detection is based on JUnit Jupiter annotations such as
@Test,@ParameterizedTest,@RepeatedTest,@TestFactory, and@TestTemplate. - Tag extraction supports both
@Tagannotations and the container form@Tags.
- See Also:
-
ClassesClassDescriptionCommand-line application for scanning Java test sources, extracting JUnit test metadata, and optionally enriching the emitted results with AI-generated security tagging suggestions.