Class Naftah.NaftahCommand

java.lang.Object
org.daiitech.naftah.Naftah.NaftahCommand
Direct Known Subclasses:
Naftah.NaftahCommand.InitCommand, Naftah.NaftahCommand.ManualCommand, Naftah.NaftahCommand.RunCommand, Naftah.NaftahCommand.ShellCommand
Enclosing class:
Naftah

private static class Naftah.NaftahCommand extends Object
The base command class for the Naftah CLI, implemented with picocli. Supports subcommands: run, init, and shell.
  • Field Details

    • NAME

      private static final String NAME
      The main command name.
      See Also:
    • arguments

      final List<String> arguments
    • enabledCaches

      final List<String> enabledCaches
    • systemProperties

      private final Map<String,String> systemProperties
    • classpath

      private String classpath
    • debug

      private boolean debug
    • encoding

      private String encoding
    • scanClasspath

      private boolean scanClasspath
    • forceScanClasspath

      private boolean forceScanClasspath
    • script

      private String script
    • helpRequested

      private boolean helpRequested
    • versionRequested

      private boolean versionRequested
    • useVectorApi

      private boolean useVectorApi
    • useNumberFormatter

      private boolean useNumberFormatter
    • useArabicIndic

      private boolean useArabicIndic
    • loadClassesAndFunctions

      private boolean loadClassesAndFunctions
  • Constructor Details

    • NaftahCommand

      private NaftahCommand()
  • Method Details

    • run

      protected void run(Naftah main, boolean bootstrapAsync) throws Exception
      Runs the command.
      Parameters:
      main - the main Naftah instance
      bootstrapAsync - whether to bootstrap asynchronously
      Throws:
      Exception - if any error occurs
    • process

      private boolean process(picocli.CommandLine.ParseResult parseResult, Naftah.NaftahCommand matchedCommand) throws picocli.CommandLine.ParameterException
      Processes the parsed command line arguments and configures the environment.
      Parameters:
      parseResult - the parsed command line result
      matchedCommand - the matched command
      Returns:
      true if processing succeeded; false otherwise
      Throws:
      picocli.CommandLine.ParameterException - if the command line is invalid