public class CommandLineArguments extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_OPTION |
private static String |
FULLSCREEN_MODE |
(package private) static String |
GAME_LOCALE |
private ch.sahits.game.openpatrician.util.GamePropertyUtility |
gameProperties |
(package private) static String |
HELP_OPTION |
private org.apache.commons.cli.CommandLineParser |
parser |
static String |
SERVER_OPTION |
(package private) static String |
VERSION_OPTION |
private static String |
WINDOWED_MODE |
| Constructor and Description |
|---|
CommandLineArguments() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkMinimalHeight(int height) |
org.apache.commons.cli.Options |
createCommandLineOptions() |
boolean |
isClient(org.apache.commons.cli.CommandLine cmdLine)
Check weather the application is started as client.
|
boolean |
isServer(org.apache.commons.cli.CommandLine cmdLine)
Check weather the application is started as server.
|
boolean |
isStandalone(org.apache.commons.cli.CommandLine cmdLine)
Check wether the commandline arguments for standalone are set.
|
org.apache.commons.cli.CommandLine |
parseCommandLine(org.apache.commons.cli.Options options,
String[] args) |
void |
persistAsPropertyFile(org.apache.commons.cli.CommandLine cmdLine)
Set the spring profiles and write some properties, which will be used by Spring.
|
void |
printHelp(org.apache.commons.cli.Options options) |
static final String VERSION_OPTION
static final String HELP_OPTION
static final String GAME_LOCALE
private static final String WINDOWED_MODE
private static final String FULLSCREEN_MODE
public static final String CLIENT_OPTION
public static final String SERVER_OPTION
private org.apache.commons.cli.CommandLineParser parser
private ch.sahits.game.openpatrician.util.GamePropertyUtility gameProperties
public org.apache.commons.cli.Options createCommandLineOptions()
public org.apache.commons.cli.CommandLine parseCommandLine(org.apache.commons.cli.Options options,
String[] args)
public void printHelp(org.apache.commons.cli.Options options)
public boolean isStandalone(org.apache.commons.cli.CommandLine cmdLine)
cmdLine - command line objectpublic boolean isServer(org.apache.commons.cli.CommandLine cmdLine)
cmdLine - command line objectpublic boolean isClient(org.apache.commons.cli.CommandLine cmdLine)
cmdLine - command line objectpublic void persistAsPropertyFile(org.apache.commons.cli.CommandLine cmdLine)
cmdLine - command line objectprivate void checkMinimalHeight(int height)
Copyright © 2011-2016 Sahits GmbH. All Rights Reserved.