Class OperatingSystemUtils
java.lang.Object
org.codehaus.plexus.interpolation.os.OperatingSystemUtils
NOTE: This class was copied from plexus-utils, to allow this library
to stand completely self-contained.
- Author:
- Trygve Laugstøl
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Default implementation to load environment variables.static interface
Defines the functionality to load a Map of environment variables. -
Method Summary
Modifier and TypeMethodDescriptionstatic Properties
static Properties
getSystemEnvVars
(boolean caseSensitive) Return the shell environment variables.static void
Set the source object to load the environment variables from.
-
Method Details
-
getSystemEnvVars
- Throws:
IOException
-
getSystemEnvVars
Return the shell environment variables. IfcaseSensitive == true
, then envar keys will all be upper-case.- Parameters:
caseSensitive
- Whether environment variable keys should be treated case-sensitively.- Returns:
- Properties object of (possibly modified) envar keys mapped to their values.
- Throws:
IOException
- in case of an error.
-
setEnvVarSource
Set the source object to load the environment variables from. Default implementation should suffice. This is mostly for testing.- Parameters:
source
- the EnvVarSource instance that loads the environment variables.- Since:
- 3.1.2
-