public final class SysUtils
extends java.lang.Object
SysUtils
class provides utility methods to interact with the environment.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MICROTESK_HOME
Name of the environment variable that stores the path to MicroTESK home folder.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getCurrentDir()
Results current directory path.
|
static java.lang.String |
getHomeDir()
Returns the path to MicroTESK home folder.
|
static java.net.URL |
getResourceUrl(java.lang.String resourceName)
Returns an URL for the specified resource file stored in
microtesk.jar . |
static java.lang.Object |
loadFromModel(java.lang.String className)
Loads a class with the specified name from
models.jar . |
static Model |
loadModel(java.lang.String modelName)
Loads a model with the specified name from
models.jar . |
static Plugin |
loadPlugin(java.lang.String className)
Loads a plug-in implemented by the specified class from
microtesk.jar . |
public static final java.lang.String MICROTESK_HOME
public static java.lang.String getHomeDir()
null
if the MICROTESK_HOME
variable that stores this information is not defined in the system.public static java.lang.String getCurrentDir()
public static Model loadModel(java.lang.String modelName)
models.jar
.modelName
- Model name.java.lang.IllegalArgumentException
- if the model name is null
or
if for some reason it cannot be loaded.public static java.lang.Object loadFromModel(java.lang.String className)
models.jar
.className
- Name of the class to be loaded.java.lang.IllegalArgumentException
- if the class name is null
or
if for some reason the class cannot be loaded.public static Plugin loadPlugin(java.lang.String className)
microtesk.jar
.className
- Name of the plug-in class.java.lang.IllegalArgumentException
- if the class name is null
or
if for some reason the class cannot be loaded.public static java.net.URL getResourceUrl(java.lang.String resourceName)
microtesk.jar
.resourceName
- Resource file name.java.lang.IllegalArgumentException
- if the argument is null
.