# 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

Modifier and Type
Method
Description
`protected static List<String>`
`getPackageList()`
The packages we wish to include in our command line
`static org.broadinstitute.barclay.argparser.CommandLineProgramProperties`
`getProgramProperty(Class clazz)`
`protected int`
`instanceMain(String[] args)`
For testing
`protected 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 GIT
`static void`
`processAllCommandLinePrograms(List<String> packageList, BiConsumer<Class<CommandLineProgram>, org.broadinstitute.barclay.argparser.CommandLineProgramProperties> clpClassProcessor)`
Process each `CommandLineProgram`-derived class given a list of packages.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PicardCommandLine

public PicardCommandLine()

## Method Details

### 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 each `CommandLineProgram`-derived class given a list of packages.

Parameters:
  `packageList` - list of packages to search
  `clpClassProcessor` - function to process each CommandLineProgram class found in `packageList` (note that the `CommandLineProgramProperties` argument may be null)

### getProgramProperty

public static org.broadinstitute.barclay.argparser.CommandLineProgramProperties getProgramProperty(Class clazz)

### printUnknown

public 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 GIT