|
Building Controls Virtual Test Bed
|

Classes | |
| enum | osName |
| Enumeration for the operating system. | |
Public Member Functions | |
| Launcher () throws FileNotFoundException, Exception | |
| Constructor. More... | |
Static Public Member Functions | |
| static void | main (String[] args) |
| Main method. More... | |
Protected Member Functions | |
| void | setupCommandList (String[] args, ArrayList< String > comLis) |
Sets up the argument list if the first flag is -command More... | |
| void | setupPtolemyArguments (String[] args, ArrayList< String > ptArgs, ArrayList< String > JVMFlags) |
Sets up the argument list if the first flag is not -command More... | |
| String | getProperty (final String key) |
| Gets a system property. More... | |
| String | getUserPropertyFileName () throws Exception |
| Get the user property file name. More... | |
| void | detectSystemVariables () throws Exception |
| Detect system variables. More... | |
| String | getBCVTBRoot () throws FileNotFoundException |
| Gets the root directory of the BCVTB. More... | |
| void | setSystemVariable (final String name, final String value) |
| Sets the variable to the system properties. More... | |
| void | resolveEnvironmentVariable () |
| Resolves all references to environment variables in the properties. More... | |
| void | initializeEnvironmentVariables () throws FileNotFoundException, Exception |
| Initializes the settings of environment variables. More... | |
| int | startProcess () |
| Starts the process. More... | |
| void | updateSystemFile () throws FileNotFoundException, IOException, Exception |
Update the ptFile if it is from an old version. More... | |
Static Protected Member Functions | |
| static int | startBCVTB (String[] args) |
| Starts the BCVTB. More... | |
Protected Attributes | |
| Properties | userProp |
| User properties. More... | |
| String | ptFile |
Ptolemy file, or null if not specified. More... | |
| boolean | run |
Flag, true if user set -run flag. More... | |
| boolean | update |
Flag, true if user set -update flag. More... | |
| Map< String, String > | prop |
| The properties of the process builder. More... | |
| String | originalPath |
| The path variable. More... | |
| ProcessBuilder | pb |
| The process builder to start Ptolemy. More... | |
| osName | os |
| The operating system. More... | |
Static Protected Attributes | |
| static boolean | console = false |
Flag, true if user set -console flag. More... | |
| static final String | PS = System.getProperty("file.separator") |
| File separator. More... | |
| static final String | LS = System.getProperty("line.separator") |
| Line separator. More... | |
Private Member Functions | |
| void | _replaceEnvironmentVariables () |
| Resolves all references to existing environment variables in the user properties. More... | |
| void | _resolveReferences () |
| Resolves all references within the user properties. More... | |
Static Private Member Functions | |
| static void | _dumpProperties (Map< String, String > p) |
| static String | _replaceAll (final String s, final String pattern, final String value) |
| static String | _replaceAllSystemVariables (final String s, final String pattern, final String value) |
Definition at line 18 of file Launcher.java.
|
inline |
Constructor.
Definition at line 21 of file Launcher.java.
References BCVTB.Launcher.console, BCVTB.Launcher.detectSystemVariables(), BCVTB.Launcher.initializeEnvironmentVariables(), BCVTB.Launcher.pb, BCVTB.Launcher.prop, BCVTB.Launcher.ptFile, BCVTB.Launcher.run, and BCVTB.Launcher.update.
Referenced by BCVTB.Launcher.main(), and BCVTB.Launcher.startBCVTB().
|
inlinestaticprivate |
Definition at line 368 of file Launcher.java.
Referenced by BCVTB.Launcher.setupPtolemyArguments().
|
inlinestaticprivate |
Definition at line 405 of file Launcher.java.
Referenced by BCVTB.Launcher._replaceAllSystemVariables(), BCVTB.Launcher.getBCVTBRoot(), and BCVTB.Launcher.initializeEnvironmentVariables().
|
inlinestaticprivate |
Definition at line 423 of file Launcher.java.
References BCVTB.Launcher._replaceAll().
Referenced by BCVTB.Launcher._replaceEnvironmentVariables(), BCVTB.Launcher._resolveReferences(), and BCVTB.Launcher.resolveEnvironmentVariable().
|
inlineprivate |
Resolves all references to existing environment variables in the user properties.
Definition at line 463 of file Launcher.java.
References BCVTB.Launcher._replaceAllSystemVariables().
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().
|
inlineprivate |
Resolves all references within the user properties.
Definition at line 484 of file Launcher.java.
References BCVTB.Launcher._replaceAllSystemVariables().
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().
|
inlineprotected |
Detect system variables.
| Exception | If the operating system is not supported. |
Definition at line 301 of file Launcher.java.
References BCVTB.Launcher.os.
Referenced by BCVTB.Launcher.Launcher().
|
inlineprotected |
Gets the root directory of the BCVTB.
| FileNotFoundException | if the root directory cannot be determined |
Definition at line 327 of file Launcher.java.
References BCVTB.Launcher._replaceAll(), BCVTB.Launcher.LS, BCVTB.Launcher.os, and start().
Referenced by BCVTB.Launcher.getUserPropertyFileName(), and BCVTB.Launcher.initializeEnvironmentVariables().
|
inlineprotected |
Gets a system property.
| key | Key of the property |
null if there is no such property Definition at line 144 of file Launcher.java.
|
inlineprotected |
Get the user property file name.
| Exception | If the operating system is not supported. |
Definition at line 153 of file Launcher.java.
References BCVTB.Launcher.getBCVTBRoot(), BCVTB.Launcher.LS, and BCVTB.Launcher.os.
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().
|
inlineprotected |
Initializes the settings of environment variables.
| FileNotFoundException | if the root directory cannot be determined |
| Exception | if the operating system is not supported |
Definition at line 508 of file Launcher.java.
References BCVTB.Launcher._replaceAll(), BCVTB.Launcher._replaceEnvironmentVariables(), BCVTB.Launcher._resolveReferences(), BCVTB.Launcher.getBCVTBRoot(), BCVTB.Launcher.getUserPropertyFileName(), BCVTB.Launcher.LS, BCVTB.Launcher.PS, BCVTB.Launcher.resolveEnvironmentVariable(), BCVTB.Launcher.setSystemVariable(), and BCVTB.Launcher.userProp.
Referenced by BCVTB.Launcher.Launcher().
|
inlinestatic |
Main method.
Definition at line 621 of file Launcher.java.
References BCVTB.Launcher.Launcher(), BCVTB.Launcher.LS, retVal, and BCVTB.Launcher.startBCVTB().
|
inlineprotected |
Resolves all references to environment variables in the properties.
Definition at line 442 of file Launcher.java.
References BCVTB.Launcher._replaceAllSystemVariables().
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().
|
inlineprotected |
Sets the variable to the system properties.
If such a variable already exists, it will be overwritten
| name | name of the variable |
| value | value of the variable |
Definition at line 398 of file Launcher.java.
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().
|
inlineprotected |
Sets up the argument list if the first flag is -command
| args | the command line arguments |
| comLis | an array list where the arguments will be stored |
| UnsupportedOperationException | if non-valid arguments are passed |
Definition at line 44 of file Launcher.java.
References i.
|
inlineprotected |
Sets up the argument list if the first flag is not -command
| args | the command line arguments |
| ptArgs | an array list where the arguments will be stored |
| JVMFlags | an array list where the JVM flags will be stored, if any are specified |
| UnsupportedOperationException | if non-valid arguments are passed |
Definition at line 81 of file Launcher.java.
References BCVTB.Launcher._dumpProperties(), BCVTB.Launcher.console, i, BCVTB.Launcher.prop, BCVTB.Launcher.ptFile, BCVTB.Launcher.run, and BCVTB.Launcher.update.
|
inlinestaticprotected |
Starts the BCVTB.
| args | list of command line arguments |
Definition at line 670 of file Launcher.java.
References BCVTB.Launcher.Launcher(), and retVal.
Referenced by BCVTB.Launcher.main().
|
inlineprotected |
Starts the process.
Definition at line 569 of file Launcher.java.
|
inlineprotected |
Update the ptFile if it is from an old version.
| FileNotFoundException | if the file is not found |
| IOException | if the file cannot be read |
| Exception | if an Exception occurs in VersionUpdater.main(String[]) |
Definition at line 693 of file Launcher.java.
References BCVTB.Launcher.ptFile.
|
staticprotected |
Flag, true if user set -console flag.
Definition at line 726 of file Launcher.java.
Referenced by BCVTB.Launcher.Launcher(), and BCVTB.Launcher.setupPtolemyArguments().
|
staticprotected |
Line separator.
Definition at line 741 of file Launcher.java.
Referenced by BCVTB.Launcher.getBCVTBRoot(), BCVTB.Launcher.getUserPropertyFileName(), BCVTB.Launcher.initializeEnvironmentVariables(), and BCVTB.Launcher.main().
|
protected |
The path variable.
Definition at line 732 of file Launcher.java.
|
protected |
The operating system.
Definition at line 747 of file Launcher.java.
Referenced by BCVTB.Launcher.detectSystemVariables(), BCVTB.Launcher.getBCVTBRoot(), and BCVTB.Launcher.getUserPropertyFileName().
|
protected |
The process builder to start Ptolemy.
Definition at line 735 of file Launcher.java.
Referenced by BCVTB.Launcher.Launcher().
|
protected |
The properties of the process builder.
Definition at line 729 of file Launcher.java.
Referenced by BCVTB.Launcher.Launcher(), and BCVTB.Launcher.setupPtolemyArguments().
|
staticprotected |
File separator.
Definition at line 738 of file Launcher.java.
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().
|
protected |
Ptolemy file, or null if not specified.
Definition at line 720 of file Launcher.java.
Referenced by BCVTB.Launcher.Launcher(), BCVTB.Launcher.setupPtolemyArguments(), and BCVTB.Launcher.updateSystemFile().
|
protected |
Flag, true if user set -run flag.
Definition at line 722 of file Launcher.java.
Referenced by BCVTB.Launcher.Launcher(), and BCVTB.Launcher.setupPtolemyArguments().
|
protected |
Flag, true if user set -update flag.
Definition at line 724 of file Launcher.java.
Referenced by BCVTB.Launcher.Launcher(), and BCVTB.Launcher.setupPtolemyArguments().
|
protected |
User properties.
Definition at line 718 of file Launcher.java.
Referenced by BCVTB.Launcher.initializeEnvironmentVariables().