public class AppCommandParser extends Object
App.getOptionDefinition(String).
o long-option is also an option
o 12 is an argument.| Constructor and Description |
|---|
AppCommandParser(AppShellServer server,
String line) |
| Modifier and Type | Method and Description |
|---|---|
App |
app() |
String |
argument(int index,
String errorMessageIfItDoesNotExist) |
List<String> |
arguments() |
String |
argumentWithDefault(int index,
String defaultValue) |
String |
getAppName() |
String |
getLine() |
String |
getLineWithoutApp() |
String |
option(String name,
String defaultValue) |
Number |
optionAsNumber(String name,
Number defaultValue) |
Map<String,String> |
options() |
static String |
parseOutAppName(String line)
Extracts the app name (f.ex.
|
public AppCommandParser(AppShellServer server, String line) throws Exception
server - the server used to find apps.line - the line from the client to interpret.Exception - if there's something wrong with the line.public static String parseOutAppName(String line)
line - the line to extract the app name from.line.public App app()
getAppName().public String argument(int index, String errorMessageIfItDoesNotExist) throws ShellException
ShellExceptionpublic String getLine()
public String getLineWithoutApp()
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.