public interface EnvironmentVariableResolver
Modifier and Type | Interface and Description |
---|---|
static class |
EnvironmentVariableResolver.Default
Default
EnvironmentVariableResolver implementation. |
Modifier and Type | Method and Description |
---|---|
String |
getEnv(String sVarName)
Return the value of the specified environment variable.
|
default String |
getEnv(String sVarName,
String sDefaultValue)
Return the value of the specified environment variable, or the specified
default value if the variable doesn't exist.
|
static EnvironmentVariableResolver |
getInstance()
Return an instance of a
EnvironmentVariableResolver discovered by
the ServiceLoader , or a default instance if none are discovered. |
String getEnv(String sVarName)
sVarName
- the name of the environment variable to returndefault String getEnv(String sVarName, String sDefaultValue)
sVarName
- the name of the environment variable to returnsDefaultValue
- the default value to return if the variable
doesn't existstatic EnvironmentVariableResolver getInstance()
EnvironmentVariableResolver
discovered by
the ServiceLoader
, or a default instance if none are discovered.EnvironmentVariableResolver