Module dev.metaschema.cli.processor
Class CommandService
java.lang.Object
dev.metaschema.cli.processor.command.CommandService
A service that loads commands using SPI.
This class implements the singleton pattern to ensure a single instance of the command service is used throughout the application.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet the loaded commands.static CommandServiceGet the singleton instance of the function service.
-
Method Details
-
getInstance
Get the singleton instance of the function service.- Returns:
- the service instance
-
getCommands
Get the loaded commands.Commands are loaded once on first access and cached for subsequent calls. This ensures thread-safe access and consistent results across calls.
- Returns:
- the list of loaded commands
-