public final class ConfigParseOptions extends Object
This object is immutable, so the "setters" return a new object.
Here is an example of creating a custom ConfigParseOptions
:
ConfigParseOptions options = ConfigParseOptions.defaults() .setSyntax(ConfigSyntax.JSON) .setAllowMissing(false)
Modifier | Constructor and Description |
---|---|
protected |
ConfigParseOptions(ConfigSyntax syntax,
String originDescription,
boolean allowMissing,
ConfigIncluder includer) |
Modifier and Type | Method and Description |
---|---|
ConfigParseOptions |
appendIncluder(ConfigIncluder includer) |
static ConfigParseOptions |
defaults() |
boolean |
getAllowMissing() |
ConfigIncluder |
getIncluder() |
String |
getOriginDescription() |
ConfigSyntax |
getSyntax() |
ConfigParseOptions |
prependIncluder(ConfigIncluder includer) |
ConfigParseOptions |
setAllowMissing(boolean allowMissing)
Set to false to throw an exception if the item being parsed (for example
a file) is missing.
|
ConfigParseOptions |
setIncluder(ConfigIncluder includer)
Set a ConfigIncluder which customizes how includes are handled.
|
ConfigParseOptions |
setOriginDescription(String originDescription)
Set a description for the thing being parsed.
|
ConfigParseOptions |
setSyntax(ConfigSyntax syntax)
Set the file format.
|
protected ConfigParseOptions(ConfigSyntax syntax, String originDescription, boolean allowMissing, ConfigIncluder includer)
public static ConfigParseOptions defaults()
public ConfigParseOptions setSyntax(ConfigSyntax syntax)
ConfigSyntax.CONF
.syntax
- a syntax or null
for best guesspublic ConfigSyntax getSyntax()
public ConfigParseOptions setOriginDescription(String originDescription)
ConfigOrigin
of the parsed values.originDescription
- public String getOriginDescription()
public ConfigParseOptions setAllowMissing(boolean allowMissing)
allowMissing
- public boolean getAllowMissing()
public ConfigParseOptions setIncluder(ConfigIncluder includer)
includer
- public ConfigParseOptions prependIncluder(ConfigIncluder includer)
public ConfigParseOptions appendIncluder(ConfigIncluder includer)
public ConfigIncluder getIncluder()