joptsimple
Class OptionalArgumentOptionSpec

java.lang.Object
  extended by joptsimple.OptionSpec
      extended by joptsimple.ArgumentAcceptingOptionSpec
          extended by joptsimple.OptionalArgumentOptionSpec

 class OptionalArgumentOptionSpec
extends ArgumentAcceptingOptionSpec

Specification of an option that accepts an optional argument.

Since:
1.0
Version:
$Id: OptionalArgumentOptionSpec.java,v 1.5 2008/05/01 15:38:45 pholser Exp $
Author:
Paul Holser

Constructor Summary
OptionalArgumentOptionSpec(java.util.List options, java.lang.String description)
           
OptionalArgumentOptionSpec(java.lang.String option)
           
 
Method Summary
(package private)  void accept(OptionSpecVisitor visitor)
           
protected  void detectOptionArgument(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions)
           
private  void handleOptionArgument(OptionParser parser, OptionSet detectedOptions, ArgumentList arguments)
           
 
Methods inherited from class joptsimple.ArgumentAcceptingOptionSpec
acceptsArguments, addArguments, argumentDescription, argumentType, canConvertArgument, convert, describedAs, equals, handleOption, hashCode, isArgumentOfNumberType, ofType, requiresArgument, withValuesSeparatedBy
 
Methods inherited from class joptsimple.OptionSpec
description, options
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionalArgumentOptionSpec

OptionalArgumentOptionSpec(java.lang.String option)

OptionalArgumentOptionSpec

OptionalArgumentOptionSpec(java.util.List options,
                           java.lang.String description)
Method Detail

detectOptionArgument

protected void detectOptionArgument(OptionParser parser,
                                    ArgumentList arguments,
                                    OptionSet detectedOptions)
Specified by:
detectOptionArgument in class ArgumentAcceptingOptionSpec

handleOptionArgument

private void handleOptionArgument(OptionParser parser,
                                  OptionSet detectedOptions,
                                  ArgumentList arguments)

accept

void accept(OptionSpecVisitor visitor)
Specified by:
accept in class OptionSpec