ConfigParseOptions

org.ekrich.config.ConfigParseOptions
See theConfigParseOptions companion object
final class ConfigParseOptions

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Appends a ConfigIncluder which customizes how includes are handled. To append, the library calls ConfigIncluder#withFallback on the existing includer.

Appends a ConfigIncluder which customizes how includes are handled. To append, the library calls ConfigIncluder#withFallback on the existing includer.

Value parameters

includer

the includer to append (may not be null)

Attributes

Returns

new version of the parse options with different includer

def getAllowMissing: Boolean

Gets the current "allow missing" flag.

Gets the current "allow missing" flag.

Attributes

Returns

whether we allow missing files

def getClassLoader: ClassLoader

Get the class loader; never returns null, if the class loader was unset, returns Thread.currentThread().getContextClassLoader().

Get the class loader; never returns null, if the class loader was unset, returns Thread.currentThread().getContextClassLoader().

Attributes

Returns

class loader to use

Gets the current includer (will be null for the default includer).

Gets the current includer (will be null for the default includer).

Attributes

Returns

current includer or null

def getOriginDescription: String

Gets the current origin description, which may be null for "automatic".

Gets the current origin description, which may be null for "automatic".

Attributes

Returns

the current origin description or null

Gets the current syntax option, which may be null for "any".

Gets the current syntax option, which may be null for "any".

Attributes

Returns

the current syntax or null

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.

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 parameters

includer

the includer to prepend (may not be null)

Attributes

Returns

new version of the parse options with different includer

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.

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 parameters

allowMissing

true to silently ignore missing item

Attributes

Returns

options with the "allow missing" flag set

def setClassLoader(loader: ClassLoader): ConfigParseOptions

Set the class loader. If set to null, Thread.currentThread().getContextClassLoader() will be used.

Set the class loader. If set to null, Thread.currentThread().getContextClassLoader() will be used.

Value parameters

loader

a class loader or null to use thread context class loader

Attributes

Returns

options with the class loader set

Set a ConfigIncluder which customizes how includes are handled. null means to use the default includer.

Set a ConfigIncluder which customizes how includes are handled. null means to use the default includer.

Value parameters

includer

the includer to use or null for default

Attributes

Returns

new version of the parse options with different includer

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.

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 parameters

originDescription

description to put in the ConfigOrigin

Attributes

Returns

options with the origin description set

Set the file format. If set to null, try to guess from any available filename extension; if guessing fails, assume ConfigSyntax#CONF.

Set the file format. If set to null, try to guess from any available filename extension; if guessing fails, assume ConfigSyntax#CONF.

Value parameters

syntax

a syntax or null for best guess

Attributes

Returns

options with the syntax set

def setSyntaxFromFilename(filename: String): ConfigParseOptions

Set the file format. If set to null, assume ConfigSyntax#CONF.

Set the file format. If set to null, assume ConfigSyntax#CONF.

Value parameters

filename

a configuration file name

Attributes

Returns

options with the syntax set

Concrete fields

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