Package picard.cmdline
Class PicardCommandLine
java.lang.Object
picard.cmdline.PicardCommandLine
This is the main class of Picard and is the way of executing individual command line programs.
CommandLinePrograms are listed in a single command line interface based on the java package specified to instanceMain.
If you want your own single command line program, extend this class and give instanceMain a new list of java packages in which to
search for classes that extend CommandLineProgram.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe packages we wish to include in our command linestatic org.broadinstitute.barclay.argparser.CommandLineProgramProperties
getProgramProperty
(Class clazz) protected int
instanceMain
(String[] args) For testingprotected int
instanceMain
(String[] args, List<String> packageList, String commandLineName) The main method.static void
Override this if you want to include different java packages to search for classes that extend CommandLineProgram.static void
printUnknown
(Set<Class<?>> classes, String command) When a command does not match any known command, searches for similar commands, using the same method as GITstatic void
processAllCommandLinePrograms
(List<String> packageList, BiConsumer<Class<CommandLineProgram>, org.broadinstitute.barclay.argparser.CommandLineProgramProperties> clpClassProcessor) Process eachCommandLineProgram
-derived class given a list of packages.
-
Constructor Details
-
PicardCommandLine
public PicardCommandLine()
-
-
Method Details
-
getPackageList
The packages we wish to include in our command line -
instanceMain
The main method. Give a list of java packages in which to search for classes that extend CommandLineProgram. Those will be included on the command line. -
instanceMain
For testing -
main
Override this if you want to include different java packages to search for classes that extend CommandLineProgram. -
processAllCommandLinePrograms
public static void processAllCommandLinePrograms(List<String> packageList, BiConsumer<Class<CommandLineProgram>, org.broadinstitute.barclay.argparser.CommandLineProgramProperties> clpClassProcessor) Process eachCommandLineProgram
-derived class given a list of packages.- Parameters:
packageList
- list of packages to searchclpClassProcessor
- function to process each CommandLineProgram class found inpackageList
(note that theCommandLineProgramProperties
argument may be null)
-
getProgramProperty
public static org.broadinstitute.barclay.argparser.CommandLineProgramProperties getProgramProperty(Class clazz) -
printUnknown
When a command does not match any known command, searches for similar commands, using the same method as GIT
-