|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bpiwowar.argparser.handlers.Handler
public abstract class Handler
Constructor Summary | |
---|---|
Handler()
|
Method Summary | |
---|---|
void |
add(ValueChecker newChecker)
Add a value checker |
Limit |
getLimitChecker(Limit.Type type,
StringScanner scanner)
|
Limit |
getLimitChecker(StringScanner scanner)
Gets a new limit checker |
OrChecker |
getRangeChecker(String rangeDesc)
Get a range checker |
boolean |
isHelpOption()
Is this a help option? |
abstract int |
parse(ArgParser argParser,
String[] args,
int idx)
Parse the arguments from the current index |
void |
processAnnotations()
Process the annotations |
void |
setPrefix(String prefix)
Called by ArgParser when the argument had a prefix (to handle the case of prefix chains) |
void |
updateRangeChecker(OrChecker orChecker,
String s)
Scan a range specification, and add the interval checks to the value handler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Handler()
Method Detail |
---|
public Limit getLimitChecker(StringScanner scanner) throws IllegalArgumentException, StringScanException
StringScanException
ArgParseException
IllegalArgumentException
public final Limit getLimitChecker(Limit.Type type, StringScanner scanner) throws IllegalArgumentException, StringScanException
IllegalArgumentException
StringScanException
public boolean isHelpOption()
public void add(ValueChecker newChecker)
index
- The index of the checkernewChecker
- the checker to add (or to replace)public void updateRangeChecker(OrChecker orChecker, String s) throws IllegalArgumentException, StringScanException
rec
- the records
- The string to parse
IllegalArgumentException
StringScanException
ArgParseException
public OrChecker getRangeChecker(String rangeDesc) throws IllegalArgumentException, StringScanException
rangeDesc
-
IllegalArgumentException
StringScanException
public abstract int parse(ArgParser argParser, String[] args, int idx) throws ArgParserException
argParser
- the argument parserargs
- The set of argumentsidx
- The index of the next argument at process
ArgParseException
StringScanException
IllegalArgumentValue
- If the parameter is not OK
ArgParserException
public void setPrefix(String prefix)
prefix
- The prefixpublic void processAnnotations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |