|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.ArgumentParser
public final class ArgumentParser
Argument parsing facility, used internally by SassCompiler.
| Nested Class Summary | |
|---|---|
static class |
ArgumentParser.Option
Describes a command-line option. |
| Method Summary | |
|---|---|
ArgumentParser.Option |
defineOption(String... names)
Define a command-line option. |
static ArgumentParser |
get()
Get access to the global Argument Parser |
String |
getInputFile()
Get the input file argument |
String |
getOptionValue(String optName)
Get an option's value. |
String |
getOutputFile()
Get the output file argument |
boolean |
isOptionSet(String optName)
Check if the user has specified an option on the command line. |
void |
parse(String[] args)
Parse the arguments passed to the application |
void |
printHelp()
Print help text |
void |
setHelpText(String help)
Set help text body. |
void |
setProgramName(String name)
Set name of the program (defaults to 'program') |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final ArgumentParser get()
public ArgumentParser.Option defineOption(String... names)
ArgumentParser.Option object with fluid
API for defining its specifics (like help text, list of valid
values/parameters and default value).
names - list of names to associate with this option. One must be
defined, any more are optional. Names may NOT overlap;
attempting to overwrite a previous name results in an
assertion failure.
public void parse(String[] args)
args - argument array - usually the command line split into its
constituent words as passed in to the Java main method.public void setProgramName(String name)
name - program name stringpublic void setHelpText(String help)
help - help textpublic void printHelp()
public String getInputFile()
public String getOutputFile()
public boolean isOptionSet(String optName)
optName - name of the option to check
public String getOptionValue(String optName)
optName - name of the option to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||