|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.typesafe.config.ConfigParseOptions
public final class ConfigParseOptions
A set of options related to parsing.
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)
| Method Summary | |
|---|---|
ConfigParseOptions |
appendIncluder(ConfigIncluder includer)
|
static ConfigParseOptions |
defaults()
|
boolean |
getAllowMissing()
|
java.lang.ClassLoader |
getClassLoader()
Get the class loader; never returns null, if the class loader was
unset, returns
Thread.currentThread().getContextClassLoader(). |
ConfigIncluder |
getIncluder()
|
java.lang.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 |
setClassLoader(java.lang.ClassLoader loader)
Set the class loader. |
ConfigParseOptions |
setIncluder(ConfigIncluder includer)
Set a ConfigIncluder which customizes how includes are handled. |
ConfigParseOptions |
setOriginDescription(java.lang.String originDescription)
Set a description for the thing being parsed. |
ConfigParseOptions |
setSyntax(ConfigSyntax syntax)
Set the file format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ConfigParseOptions defaults()
public ConfigParseOptions setSyntax(ConfigSyntax syntax)
ConfigSyntax.CONF.
syntax - a syntax or null for best guess
public ConfigSyntax getSyntax()
public ConfigParseOptions setOriginDescription(java.lang.String originDescription)
ConfigOrigin of the parsed values.
originDescription -
public java.lang.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()
public ConfigParseOptions setClassLoader(java.lang.ClassLoader loader)
Thread.currentThread().getContextClassLoader() will be used.
loader - a class loader or null to use thread context class
loader
public java.lang.ClassLoader getClassLoader()
null, if the class loader was
unset, returns
Thread.currentThread().getContextClassLoader().
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||