Class CommandLine


  • public class CommandLine
    extends java.lang.Object

    Command line usage class.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String className  
      private static java.util.logging.Logger logger  
      private static java.lang.String OMITXMLDECL  
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandLine()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String getArgValue​(java.lang.String[] args, java.lang.String name, java.lang.String defaultValue)  
      private static boolean getSwitchArgument​(java.lang.String[] args, java.lang.String name)
      If the specified argument name exists without a value, return true.
      static void main​(java.lang.String[] args)  
      private static boolean toBoolean​(java.lang.String s)  
      • Methods inherited from class java.lang.Object

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

      • className

        private static final java.lang.String className
      • logger

        private static final java.util.logging.Logger logger
    • Constructor Detail

      • CommandLine

        public CommandLine()
    • Method Detail

      • getSwitchArgument

        private static boolean getSwitchArgument​(java.lang.String[] args,
                                                 java.lang.String name)
        If the specified argument name exists without a value, return true. If it exists with a value, translate it as a boolean.
        Parameters:
        args - the command line arguments
        name - the switch name
        Returns:
        true, or false, depending on whether the switch has been specified
      • getArgValue

        private static java.lang.String getArgValue​(java.lang.String[] args,
                                                    java.lang.String name,
                                                    java.lang.String defaultValue)
      • toBoolean

        private static boolean toBoolean​(java.lang.String s)