|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.beust.jcommander.JCommander
public class JCommander
The main class for JCommander. It's responsible for parsing the object that contains all the annotated fields, parse the command line and assign the fields with the correct values and a few other helper methods, such as usage().
| Constructor Summary | |
|---|---|
JCommander(Object object)
|
|
JCommander(Object object,
ResourceBundle bundle,
String... args)
|
|
JCommander(Object object,
String... args)
|
|
| Method Summary | |
|---|---|
List<ParameterDescription> |
getParameters()
|
void |
parse(String... args)
Parse the command line parameters. |
static List<String> |
readFile(String fileName)
Reads the file specified by filename and returns the file content as a string. |
void |
usage()
Display a the help on System.out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JCommander(Object object)
public JCommander(Object object,
ResourceBundle bundle,
String... args)
public JCommander(Object object,
String... args)
| Method Detail |
|---|
public void parse(String... args)
public static List<String> readFile(String fileName)
fileName - the command line filename
public void usage()
public List<ParameterDescription> getParameters()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||