Class CommandOptions

java.lang.Object
org.episteme.natural.chemistry.loaders.cml.util.CommandOptions

public class CommandOptions extends Object
Container and processor for a collection of command-line options. Handles argument parsing and usage reporting.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • CommandOptions

      public CommandOptions()
      do not use.
    • CommandOptions

      public CommandOptions(String[] args, CommandOptionManager com)
      Creates a new CommandOptions object.
      Parameters:
      args - the command-line arguments to parse
      com - the manager for these options
  • Method Details

    • extendOptions

      protected CommandOption[] extendOptions()
      Returns the array of default options. Subclasses should override this to add more.
      Returns:
      the array of CommandOption objects
    • getOptions

      protected CommandOption[] getOptions()
      Aggregates options from the class hierarchy.
      Returns:
      the complete array of options
    • setCommandOptionManager

      public void setCommandOptionManager(CommandOptionManager commandOptionManager)
      Sets the command option manager.
      Parameters:
      commandOptionManager - the manager to set
    • getCommandOptionManager

      public CommandOptionManager getCommandOptionManager()
      Returns the command option manager.
      Returns:
      the manager
    • usage

      public void usage(PrintStream out)
      Prints the usage information to the specified stream.
      Parameters:
      out - the print stream to output to
    • process

      public void process() throws Exception
      Triggers the processing of the options via the manager.
      Throws:
      Exception - if processing fails