bpiwowar.argparser.handlers
Class ClassChooser

java.lang.Object
  extended by bpiwowar.argparser.handlers.Handler
      extended by bpiwowar.argparser.handlers.GenericHandler
          extended by bpiwowar.argparser.handlers.GenericObjectsHandler
              extended by bpiwowar.argparser.handlers.ClassChooser

public class ClassChooser
extends GenericObjectsHandler

A class chooser handler Example of use

Author:
B. Piwowarski

Nested Class Summary
static interface ClassChooser.Choice
           
static interface ClassChooser.Choices
          Gives the reference to an enumeration of the possible choices.
static interface ClassChooser.Instances
          Defines a set of classes that should implement If nothing is given, explores the inner classes
static interface ClassChooser.Prefix
          Deprecated. 
static class ClassChooser.TypeChecker
           
 
Field Summary
 
Fields inherited from class bpiwowar.argparser.handlers.GenericObjectsHandler
nbExpectedValues
 
Fields inherited from class bpiwowar.argparser.handlers.GenericHandler
field, object
 
Constructor Summary
ClassChooser(Object object, Field field)
          Initialisation of the class chooser
 
Method Summary
protected  Object getValue(ArgParser argParser, String value)
           
 void setPrefix(String prefix)
          Called by ArgParser when the argument had a prefix (to handle the case of prefix chains)
 
Methods inherited from class bpiwowar.argparser.handlers.GenericObjectsHandler
addValue, get, getAnnotation, newInstance, optionSet, parse, process, process
 
Methods inherited from class bpiwowar.argparser.handlers.Handler
add, getLimitChecker, getLimitChecker, getRangeChecker, isHelpOption, processAnnotations, updateRangeChecker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassChooser

public ClassChooser(Object object,
                    Field field)
Initialisation of the class chooser

Parameters:
object -
field -
Method Detail

setPrefix

public void setPrefix(String prefix)
Description copied from class: Handler
Called by ArgParser when the argument had a prefix (to handle the case of prefix chains)

Overrides:
setPrefix in class Handler
Parameters:
prefix - The prefix

getValue

protected Object getValue(ArgParser argParser,
                          String value)
                   throws ArgParseException
Overrides:
getValue in class GenericObjectsHandler
Throws:
ArgParseException


Copyright © 2013. All Rights Reserved.