joptsimple
Class OptionalArgumentOptionSpec<V>

java.lang.Object
  extended by joptsimple.AbstractOptionSpec<V>
      extended by joptsimple.ArgumentAcceptingOptionSpec<V>
          extended by joptsimple.OptionalArgumentOptionSpec<V>
Type Parameters:
V - represents the type of the arguments this option accepts
All Implemented Interfaces:
OptionSpec<V>

 class OptionalArgumentOptionSpec<V>
extends ArgumentAcceptingOptionSpec<V>

Specification of an option that accepts an optional argument.

Version:
$Id: OptionalArgumentOptionSpec.java,v 1.15 2009/03/06 20:35:08 pholser Exp $
Author:
Paul Holser

Constructor Summary
OptionalArgumentOptionSpec(java.util.Collection<java.lang.String> 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, canConvertArgument, convert, describedAs, equals, handleOption, hashCode, isArgumentOfNumberType, ofType, requiresArgument, typeIndicator, withValuesConvertedBy, withValuesSeparatedBy
 
Methods inherited from class joptsimple.AbstractOptionSpec
description, options, toString, value, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OptionalArgumentOptionSpec

OptionalArgumentOptionSpec(java.lang.String option)

OptionalArgumentOptionSpec

OptionalArgumentOptionSpec(java.util.Collection<java.lang.String> options,
                           java.lang.String description)
Method Detail

detectOptionArgument

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

handleOptionArgument

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

accept

void accept(OptionSpecVisitor visitor)
Specified by:
accept in class AbstractOptionSpec<V>