ConfigParseOptions

final class ConfigParseOptions
Companion
object
class Object
trait Matchable
class Any

Value members

Methods

Set the file format. If set to null, try to guess from any available
filename extension; if guessing fails, assume [[ConfigSyntax#CONF]].
Value Params
syntax
a syntax or null for best guess
Returns
options with the syntax set
Set the file format. If set to null, assume [[ConfigSyntax#CONF]].
Value Params
filename
a configuration file name
Returns
options with the syntax set
Gets the current syntax option, which may be null for "any".
Returns
the current syntax or null
def setOriginDescription(originDescription: String): ConfigParseOptions
Set a description for the thing being parsed. In most cases this will be
set up for you to something like the filename, but if you provide just an
input stream you might want to improve on it. Set to null to allow the
library to come up with something automatically. This description is the
basis for the [[ConfigOrigin]] of the parsed values.
Value Params
originDescription
description to put in the [[ConfigOrigin]]
Returns
options with the origin description set
Gets the current origin description, which may be null for "automatic".
Returns
the current origin description or null
def setAllowMissing(allowMissing: Boolean): ConfigParseOptions
Set to false to throw an exception if the item being parsed (for example
a file) is missing. Set to true to just return an empty document in that
case. Note that this setting applies on only to fetching the root document,
it has no effect on any nested includes.
Value Params
allowMissing
true to silently ignore missing item
Returns
options with the "allow missing" flag set
def getAllowMissing: Boolean
Gets the current "allow missing" flag.
Returns
whether we allow missing files
Set a [[ConfigIncluder]] which customizes how includes are handled.
null means to use the default includer.
Value Params
includer
the includer to use or null for default
Returns
new version of the parse options with different includer
Prepends a [[ConfigIncluder]] which customizes how
includes are handled. To prepend your includer, the
library calls [[ConfigIncluder#withFallback]] on your
includer to append the existing includer to it.
Value Params
includer
the includer to prepend (may not be null)
Returns
new version of the parse options with different includer
Appends a [[ConfigIncluder]] which customizes how
includes are handled. To append, the library calls
[[ConfigIncluder#withFallback]] on the existing includer.
Value Params
includer
the includer to append (may not be null)
Returns
new version of the parse options with different includer
Gets the current includer (will be null for the default includer).
Returns
current includer or null
def setClassLoader(loader: ClassLoader): ConfigParseOptions
Set the class loader. If set to null,
Thread.currentThread().getContextClassLoader() will be used.
Value Params
loader
a class loader or null to use thread context class
loader
Returns
options with the class loader set
def getClassLoader: ClassLoader
Get the class loader; never returns null, if the class loader was
unset, returns
Thread.currentThread().getContextClassLoader().
Returns
class loader to use

Fields

val originDescription: String
val allowMissing: Boolean
val classLoader: ClassLoader