Class CommandLineParser

java.lang.Object
net.sf.jailer.CommandLineParser

public class CommandLineParser extends Object
Parser for CommandLine.
Author:
Ralf Wisser
  • Constructor Details

    • CommandLineParser

      public CommandLineParser()
  • Method Details

    • parse

      public static CommandLine parse(String[] cliArgs, boolean silent) throws Exception
      Parses arguments and initializes the parser.
      Parameters:
      cliArgs - the arguments
      silent - if true, no error messages will be written
      Throws:
      Exception
    • preprocessFileLookup

      public static String[] preprocessFileLookup(String[] cArgs) throws IOException
      Pre-processes the -file-lookup options by replacing each such option and its file-name argument with the first line read from that file.
      Parameters:
      cArgs - the raw command-line arguments
      Returns:
      the processed argument array
      Throws:
      IOException
    • printUsage

      public static void printUsage(String[] args)
      Prints out usage.
      Parameters:
      args - the original command-line arguments (used only for printing the argument list at the end)
    • printAruments

      public static void printAruments(PrintStream out, String[] args, String password)
      Prints the supplied argument list to the given stream, masking any argument that equals the password.
      Parameters:
      out - the stream to print to
      args - the command-line arguments to print
      password - the password value to mask, or null if no masking is needed