Class CommandLineSupport


  • final class CommandLineSupport
    extends java.lang.Object
    Internal utility to parse and create command lines arguments.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CommandLineSupport()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void addArgument​(java.util.List<java.lang.String> args, java.lang.StringBuilder current)  
      (package private) static java.lang.String quote​(java.lang.String arg)
      Quotes a single command line argument if necessary.
      (package private) static java.lang.String quote​(java.util.List<java.lang.String> args)
      Builds a single command line string from the given argument list.
      (package private) static java.util.List<java.lang.String> split​(java.lang.String commandline)
      Splits a command line into single arguments and removes quotes if present.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommandLineSupport

        private CommandLineSupport()
    • Method Detail

      • quote

        static java.lang.String quote​(java.lang.String arg)
        Quotes a single command line argument if necessary.
        Parameters:
        arg - command line argument
        Returns:
        quoted argument
      • quote

        static java.lang.String quote​(java.util.List<java.lang.String> args)
        Builds a single command line string from the given argument list. Arguments are quoted when necessary.
        Parameters:
        args - command line arguments
        Returns:
        combined command line
      • split

        static java.util.List<java.lang.String> split​(java.lang.String commandline)
        Splits a command line into single arguments and removes quotes if present.
        Parameters:
        commandline - combined command line
        Returns:
        list of arguments
      • addArgument

        private static void addArgument​(java.util.List<java.lang.String> args,
                                        java.lang.StringBuilder current)