|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbpiwowar.argparser.handlers.Handler
bpiwowar.argparser.handlers.GenericHandler
bpiwowar.argparser.handlers.GenericObjectsHandler
public abstract class GenericObjectsHandler
Field Summary | |
---|---|
protected int |
nbExpectedValues
|
Fields inherited from class bpiwowar.argparser.handlers.GenericHandler |
---|
field, object |
Constructor Summary | |
---|---|
GenericObjectsHandler(Object object,
Field field)
Deprecated. |
|
GenericObjectsHandler(Object object,
Field field,
Class<?> aClass)
Construct a new wrapper |
Method Summary | ||
---|---|---|
protected void |
addValue(Object value)
Add a new value |
|
protected Object |
get()
Get the value of the object |
|
protected
|
getAnnotation(Class<T> aClass)
|
|
protected Object |
getValue(ArgParser argParser,
String arg)
|
|
protected Object |
newInstance()
Creates a new instance of the field (if it makes sense) |
|
void |
optionSet()
|
|
int |
parse(ArgParser argParser,
String[] args,
int idx)
Parse the arguments from the current index |
|
protected Object |
process(ArgParser argParser,
String value)
|
|
protected Object |
process(ArgParser argParser,
StringScanner scanner)
|
Methods inherited from class bpiwowar.argparser.handlers.Handler |
---|
add, getLimitChecker, getLimitChecker, getRangeChecker, isHelpOption, processAnnotations, setPrefix, updateRangeChecker |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int nbExpectedValues
Constructor Detail |
---|
@Deprecated public GenericObjectsHandler(Object object, Field field)
GenericObjectsHandler(Object, Field, Class)
object
- field
- public GenericObjectsHandler(Object object, Field field, Class<?> aClass)
object
- The object (either holder, or containing a holder field)field
- The field of the object (or null if the holder is the object)Method Detail |
---|
public final int parse(ArgParser argParser, String[] args, int idx) throws ArgParseException, StringScanException, IllegalArgumentValue
Handler
parse
in class Handler
argParser
- the argument parserargs
- The set of argumentsidx
- The index of the next argument at process
ArgParseException
StringScanException
IllegalArgumentValue
- If the parameter is not OKprotected Object process(ArgParser argParser, String value) throws StringScanException, ArgParseException, IllegalArgumentValue
StringScanException
ArgParseException
IllegalArgumentValue
protected Object process(ArgParser argParser, StringScanner scanner) throws StringScanException, ArgParseException, IllegalArgumentValue
StringScanException
ArgParseException
IllegalArgumentValue
protected Object getValue(ArgParser argParser, String arg) throws ArgParseException
ArgParseException
public void optionSet()
protected void addValue(Object value)
value
- The valueprotected Object get()
protected Object newInstance()
protected <T extends Annotation> T getAnnotation(Class<T> aClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |