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)
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
PATH_TOKEN_SEPARATOR
a.b.c a->b->c
|
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigParseOptions |
appendIncluder(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder includer)
Appends a
ConfigIncluder which customizes how includes are handled. |
static ConfigParseOptions |
defaults()
Gets an instance of
ConfigParseOptions with all fields set to the default values. |
boolean |
getAllowMissing()
Gets the current "allow missing" flag.
|
ClassLoader |
getClassLoader()
Get the class loader; never returns
null, if the class loader was unset, returns
Thread.currentThread().getContextClassLoader(). |
org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder |
getIncluder()
Gets the current includer (will be null for the default includer).
|
String |
getOriginDescription()
Gets the current origin description, which may be null for "automatic".
|
org.apache.seatunnel.shade.com.typesafe.config.ConfigSyntax |
getSyntax()
Gets the current syntax option, which may be null for "any".
|
ConfigParseOptions |
prependIncluder(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder includer)
Prepends a
ConfigIncluder which customizes how includes are handled. |
ConfigParseOptions |
setAllowMissing(boolean allowMissing)
Set to false to throw an exception if the item being parsed (for example a file) is missing.
|
ConfigParseOptions |
setClassLoader(ClassLoader loader)
Set the class loader.
|
ConfigParseOptions |
setIncluder(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder includer)
Set a
ConfigIncluder which customizes how includes are handled. null means to use the
default includer. |
ConfigParseOptions |
setOriginDescription(String originDescription)
Set a description for the thing being parsed.
|
ConfigParseOptions |
setSyntax(org.apache.seatunnel.shade.com.typesafe.config.ConfigSyntax syntax)
Set the file format.
|
public static ConfigParseOptions defaults()
ConfigParseOptions with all fields set to the default values.
Start with this instance and make any changes you need.public ConfigParseOptions setSyntax(org.apache.seatunnel.shade.com.typesafe.config.ConfigSyntax syntax)
ConfigSyntax.CONF.syntax - a syntax or null for best guesspublic org.apache.seatunnel.shade.com.typesafe.config.ConfigSyntax getSyntax()
public ConfigParseOptions setOriginDescription(String originDescription)
ConfigOrigin of the parsed values.originDescription - description to put in the ConfigOriginpublic String getOriginDescription()
public ConfigParseOptions setAllowMissing(boolean allowMissing)
allowMissing - true to silently ignore missing itempublic boolean getAllowMissing()
public ConfigParseOptions setIncluder(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder includer)
ConfigIncluder which customizes how includes are handled. null means to use the
default includer.includer - the includer to use or null for defaultpublic ConfigParseOptions prependIncluder(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder includer)
ConfigIncluder which customizes how includes are handled. To prepend your
includer, the library calls ConfigIncluder.withFallback(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder) on your includer to append
the existing includer to it.includer - the includer to prepend (may not be null)public ConfigParseOptions appendIncluder(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder includer)
ConfigIncluder which customizes how includes are handled. To append, the
library calls ConfigIncluder.withFallback(org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder) on the existing includer.includer - the includer to append (may not be null)public org.apache.seatunnel.shade.com.typesafe.config.ConfigIncluder getIncluder()
public ConfigParseOptions setClassLoader(ClassLoader loader)
Thread.currentThread().getContextClassLoader()
will be used.loader - a class loader or null to use thread context class loaderpublic ClassLoader getClassLoader()
null, if the class loader was unset, returns
Thread.currentThread().getContextClassLoader().Copyright © 2023 The Apache Software Foundation. All rights reserved.