Class CommandLineTool

    • Constructor Summary

      Constructors 
      Constructor Description
      CommandLineTool()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getDescription()
      Gives a human-readable description of this tool.
      protected java.io.File parseInputDirectory​(java.lang.String path)  
      protected java.io.File parseInputFile​(java.lang.String path)  
      protected java.io.File parseOutputDirectory​(java.lang.String path, boolean allowExisting)
      Parses an output directory path provided as a string argument.
      protected java.io.File parseOutputFile​(java.lang.String path)  
      abstract void run()
      Runs this tool.
      void start​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

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

      • CommandLineTool

        public CommandLineTool()
    • Method Detail

      • start

        public final void start​(java.lang.String[] args)
      • run

        public abstract void run()
        Runs this tool. This method is called by start(String[]). When this method is called it can be assumed that arguments have already been mapped to fields.
      • parseInputFile

        protected java.io.File parseInputFile​(java.lang.String path)
      • parseInputDirectory

        protected java.io.File parseInputDirectory​(java.lang.String path)
      • parseOutputFile

        protected java.io.File parseOutputFile​(java.lang.String path)
      • parseOutputDirectory

        protected java.io.File parseOutputDirectory​(java.lang.String path,
                                                    boolean allowExisting)
        Parses an output directory path provided as a string argument.
        Parameters:
        allowExisting - When true, allow already existing directories to be used.
      • getDescription

        protected java.lang.String getDescription()
        Gives a human-readable description of this tool. This description will be printed with the usage instructions. The default description is the name of the class.