Skip to content

Add compile-time annotation processor to reduce runtime reflection#371

Merged
stalep merged 1 commit intoaeshell:masterfrom
stalep:processor
Mar 12, 2026
Merged

Add compile-time annotation processor to reduce runtime reflection#371
stalep merged 1 commit intoaeshell:masterfrom
stalep:processor

Conversation

@stalep
Copy link
Member

@stalep stalep commented Mar 12, 2026

Introduces aesh-processor module with a JSR 269 annotation processor that generates CommandMetadataProvider implementations for @CommandDefinition and @GroupCommandDefinition classes. Generated code uses ProcessedCommandBuilder/ ProcessedOptionBuilder with literal values and direct new X() calls, eliminating annotation scanning and reflective instantiation at runtime.

Dual-mode: if generated providers are on the classpath (via ServiceLoader), AeshCommandContainerBuilder uses them; otherwise it falls back to the existing reflection path with zero behavior change for existing users.

Introduces aesh-processor module with a JSR 269 annotation processor that
generates CommandMetadataProvider implementations for @CommandDefinition and
@GroupCommandDefinition classes. Generated code uses ProcessedCommandBuilder/
ProcessedOptionBuilder with literal values and direct new X() calls, eliminating
annotation scanning and reflective instantiation at runtime.

Dual-mode: if generated providers are on the classpath (via ServiceLoader),
AeshCommandContainerBuilder uses them; otherwise it falls back to the existing
reflection path with zero behavior change for existing users.
@stalep stalep merged commit 7188648 into aeshell:master Mar 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant