Class CommandLineParser


  • public class CommandLineParser
    extends java.lang.Object
    Takes a command line, like given to the Main.main(java.lang.String[]) method, and turns it into a ConfigurationOptions object.
    Version:
    $Id: CommandLineParser.java,v 1.29 2009/08/19 22:11:15 benoitx Exp $
    Author:
    Richard Cyganiak
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandLineParser​(java.lang.String[] args)
      Constructor for CommandLineParser
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkForRequiredArgs()  
      protected boolean doChildrenSwitch​(java.lang.String s)
      Give the argument to children classes that may have a way to recognise it.
      protected int getArgCount()  
      protected boolean isArgsEmpty()  
      void parse()
      Parses the command line and sets the options (as static fields in ConfigurationOptions).
      protected void parseSwitch​(java.lang.String switchName)  
      protected java.lang.String popNextArg()  
      • Methods inherited from class java.lang.Object

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

      • CommandLineParser

        public CommandLineParser​(java.lang.String[] args)
        Constructor for CommandLineParser
        Parameters:
        args - the command line parameters