bpiwowar.argparser.handlers
Class MethodCallHandler

java.lang.Object
  extended by bpiwowar.argparser.handlers.Handler
      extended by bpiwowar.argparser.handlers.MethodCallHandler

public class MethodCallHandler
extends Handler

A handler that calls a method with method arguments extracted from command line

Author:
B. Piwowarski

Constructor Summary
MethodCallHandler(Object object, Method method, Handler[] handlers, ObjectHolder<?>[] holders, String regexp)
           
 
Method Summary
 int parse(ArgParser argParser, String[] args, int idx)
          Parse the arguments from the current index
 
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
 

Constructor Detail

MethodCallHandler

public MethodCallHandler(Object object,
                         Method method,
                         Handler[] handlers,
                         ObjectHolder<?>[] holders,
                         String regexp)
Method Detail

parse

public int parse(ArgParser argParser,
                 String[] args,
                 int idx)
          throws ArgParserException
Description copied from class: Handler
Parse the arguments from the current index

Specified by:
parse in class Handler
Parameters:
argParser - the argument parser
args - The set of arguments
idx - The index of the next argument at process
Throws:
ArgParseException
StringScanException
IllegalArgumentValue - If the parameter is not OK
ArgParserException


Copyright © 2013. All Rights Reserved.