public class OptParse<E> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OptParse.OptHandler<E>
a class to handle one option
|
Constructor and Description |
---|
OptParse() |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(OptParse.OptHandler<E> handler)
add a handler for some option
|
void |
exitParsing()
a handler can call this to interrupt the parsing
|
E |
parse(String[] args,
E e) |
void |
printHelp()
print help of all options
|
void |
setHelp(String helpString)
change the main help string, which will be printed if asked, or
if a wrong option is given
|
public String[] realArgs
public void addHandler(OptParse.OptHandler<E> handler)
handler
- the handlerpublic void setHelp(String helpString)
helpString
- the help stringpublic void printHelp()
public void exitParsing()
Copyright © 2022. All rights reserved.