Package picard.cmdline
Class PicardCommandLine
- java.lang.Object
-
- picard.cmdline.PicardCommandLine
-
public class PicardCommandLine extends Object
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 Constructor Description PicardCommandLine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static List<String>
getPackageList()
The 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
main(String[] args)
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.
-
-
-
Method Detail
-
getPackageList
protected static List<String> getPackageList()
The packages we wish to include in our command line
-
instanceMain
protected int instanceMain(String[] args, List<String> packageList, String commandLineName)
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
protected int instanceMain(String[] args)
For testing
-
main
public static void main(String[] args)
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)
-
-