org.sitemesh.config.cmdline
Class ArgParser
java.lang.Object
org.sitemesh.config.cmdline.ArgParser
public class ArgParser
- extends Object
Simple command line argument parser that extracts a list of key/value properties and remaining arguments.
Examples:
"-firstname", "Joe", "-lastname", "Walnes", "a", "b", "c"
"--firstname", "Joe", "--lastname", "Walnes", "a", "b", "c"
"--firstname=Joe", "--lastname=Walnes", "a", "b", "c"
"--firstname=Joe", "--lastname" (illegal: No value for lastname)
"--firstname=Joe", "a", "b", "--lastname", "Walnes" (illegal: Named parameters have to appear first in list)
- Author:
- Joe Walnes
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArgParser
public ArgParser(String... args)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getProperties
public Map<String,String> getProperties()
getRemaining
public List<String> getRemaining()
Copyright © 2011. All Rights Reserved.