com.vaadin.sass
Class ArgumentParser.Option

java.lang.Object
  extended by com.vaadin.sass.ArgumentParser.Option
Enclosing class:
ArgumentParser

public static class ArgumentParser.Option
extends Object

Describes a command-line option.


Constructor Summary
protected ArgumentParser.Option(String... names)
           
 
Method Summary
 ArgumentParser.Option defaultValue(String value)
          Specify a default value for this Option.
protected  String getDefaultValue()
           
protected  String getHelp()
           
protected  List<String> getNames()
           
protected  List<String> getValidValues()
           
protected  String getValue()
           
 ArgumentParser.Option help(String desc)
          Specify the help text for this command-line option.
protected  boolean isSet()
           
protected  void markSet()
           
protected  boolean setValue(String value)
           
protected  boolean supportsValues()
           
 ArgumentParser.Option values(String... values)
          Specify the list of valid values for this Option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgumentParser.Option

protected ArgumentParser.Option(String... names)
Method Detail

values

public ArgumentParser.Option values(String... values)
Specify the list of valid values for this Option.

Parameters:
values - a list of values to accept for this option. Value input other than one of these values results in program termination.
Returns:
a reference to self

defaultValue

public ArgumentParser.Option defaultValue(String value)
Specify a default value for this Option. If this option is not specified on the command line, ArgumentParser.getOptionValue(String) for this option will return this default value. This method must only be called after a list of valid input values has been set via a call to values(String...).

Parameters:
value - a previously defined valid value string
Returns:
a reference to self

help

public ArgumentParser.Option help(String desc)
Specify the help text for this command-line option. This is optional, but can (and should) offer the user additional information about what this particular option does.

Parameters:
desc - a descriptive help text
Returns:
a reference to self

supportsValues

protected boolean supportsValues()

markSet

protected void markSet()

setValue

protected boolean setValue(String value)

getValue

protected String getValue()

isSet

protected boolean isSet()

getNames

protected List<String> getNames()

getHelp

protected String getHelp()

getValidValues

protected List<String> getValidValues()

getDefaultValue

protected String getDefaultValue()


Copyright © 2013–2015 Vaadin. All rights reserved.