public final class ConfigResolveOptions extends java.lang.Object
${foo.bar} syntax and are documented in the HOCON
spec.
Typically this class would be used with the method
Config.resolve(ConfigResolveOptions).
This object is immutable, so the "setters" return a new object.
Here is an example of creating a custom ConfigResolveOptions:
ConfigResolveOptions options = ConfigResolveOptions.defaults()
.setUseSystemEnvironment(false)
In addition to defaults(), there's a prebuilt
noSystem() which avoids looking at any system
environment variables or other external system information. (Right now,
environment variables are the only example.)
| Modifier and Type | Method and Description |
|---|---|
static ConfigResolveOptions |
defaults()
Returns the default resolve options.
|
boolean |
getAllowUnresolved()
Returns whether the options allow unresolved substitutions.
|
boolean |
getUseSystemEnvironment()
Returns whether the options enable use of system environment variables.
|
static ConfigResolveOptions |
noSystem()
Returns resolve options that disable any reference to "system" data
(currently, this means environment variables).
|
ConfigResolveOptions |
setAllowUnresolved(boolean value)
Returns options with "allow unresolved" set to the given value.
|
ConfigResolveOptions |
setUseSystemEnvironment(boolean value)
Returns options with use of environment variables set to the given value.
|
public static defaults()
public static noSystem()
public setUseSystemEnvironment(boolean value)
value - true to resolve substitutions falling back to environment
variables.public boolean getUseSystemEnvironment()
public setAllowUnresolved(boolean value)
Config.resolve(ConfigResolveOptions) itself
will not throw.value - true to silently ignore unresolved substitutions.public boolean getAllowUnresolved()