public class SystemEnvironment
extends java.util.Properties
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
SystemEnvironment.PumpStreamHandler |
class |
SystemEnvironment.StreamPumper |
Modifier and Type | Field and Description |
---|---|
protected static SystemEnvironment |
instance |
Modifier | Constructor and Description |
---|---|
protected |
SystemEnvironment()
The constructor
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
findEnv(java.lang.String val)
Find and replace environment values inside the given string value.
|
static java.lang.String |
getEnv(java.lang.String key)
get an environment varibale.
|
static java.lang.String |
getEnv(java.lang.String key,
java.lang.String defaultVal)
get an environment varibale.
|
protected void |
getEnvironment()
Find the list of environment variables for this process.
|
static SystemEnvironment |
getInstance()
Get the instance of that factory.
|
static boolean |
isArch(java.lang.String arch)
Determines if the OS on which Ant is executing matches the
given OS architecture.
|
static boolean |
isFamily(java.lang.String family)
Determines if the OS on which Ant is executing matches the
given OS family.
|
static boolean |
isName(java.lang.String name)
Determines if the OS on which Ant is executing matches the
given OS name.
|
static boolean |
isOs(java.lang.String family,
java.lang.String name,
java.lang.String arch,
java.lang.String version)
Determines if the OS on which Ant is executing matches the
given OS family, name, architecture and version
|
static boolean |
isVersion(java.lang.String version)
Determines if the OS on which Ant is executing matches the
given OS version.
|
static void |
main(java.lang.String[] args)
The main testing routine.
|
static java.lang.String |
replaceEnvironments(java.lang.String s)
Replace the environment variables inside the file specification.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
protected static SystemEnvironment instance
public static SystemEnvironment getInstance()
public static java.lang.String getEnv(java.lang.String key, java.lang.String defaultVal)
public static java.lang.String getEnv(java.lang.String key)
public static java.lang.String findEnv(java.lang.String val)
protected void getEnvironment()
public static boolean isFamily(java.lang.String family)
public static boolean isName(java.lang.String name)
public static boolean isArch(java.lang.String arch)
public static boolean isVersion(java.lang.String version)
public static boolean isOs(java.lang.String family, java.lang.String name, java.lang.String arch, java.lang.String version)
family
- The OS familyname
- The OS namearch
- The OS architectureversion
- The OS versionpublic static java.lang.String replaceEnvironments(java.lang.String s)
s
- the string that contains environments.public static void main(java.lang.String[] args)
args
- The runtime parameters.