Top Description Constructors Methods
com.typesafe.config.parser

public final Class ConfigDocumentFactory

extends Object
Class Inheritance
Imports
com.typesafe.config.ConfigParseOptions, com.typesafe.config.impl.Parseable, java.io.File, .Reader

Factory for creating com.typesafe.config.parser.ConfigDocument instances.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ConfigDocument

Returns:

the parsed configuration
parseFile
(File
the file to parse
file
,
ConfigParseOptions
parse options to control how the file is interpreted
options
)

Parses a file into a ConfigDocument instance.

public static ConfigDocument

Returns:

the parsed configuration
parseFile
(File
the file to parse
file
)

Parses a file into a ConfigDocument instance as with parseFile(File, ConfigParseOptions) but always uses the default parse options.

public static ConfigDocument

Returns:

the parsed configuration
parseReader
(Reader
the reader to parse
reader
,
ConfigParseOptions
parse options to control how the reader is interpreted
options
)

Parses a Reader into a ConfigDocument instance.

public static ConfigDocument

Returns:

the parsed configuration
parseReader
(Reader
the reader to parse
reader
)

Parses a reader into a Config instance as with parseReader(Reader, ConfigParseOptions) but always uses the default parse options.

public static ConfigDocument

Returns:

the parsed configuration
parseString
(String
string to parse
s
,
ConfigParseOptions
parse options
options
)

Parses a string which should be valid HOCON or JSON.

public static ConfigDocument

Returns:

the parsed configuration
parseString
(String
string to parse
s
)

Parses a string (which should be valid HOCON or JSON).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConfigDocumentFactoryback to summary
public ConfigDocumentFactory()

Method Detail

parseFileback to summary
public static ConfigDocument parseFile(File file, ConfigParseOptions options)

Parses a file into a ConfigDocument instance.

Parameters
file:File

the file to parse

options:ConfigParseOptions

parse options to control how the file is interpreted

Returns:ConfigDocument

the parsed configuration

Exceptions
ConfigException:
on IO or parse errors
parseFileback to summary
public static ConfigDocument parseFile(File file)

Parses a file into a ConfigDocument instance as with parseFile(File, ConfigParseOptions) but always uses the default parse options.

Parameters
file:File

the file to parse

Returns:ConfigDocument

the parsed configuration

Exceptions
ConfigException:
on IO or parse errors
parseReaderback to summary
public static ConfigDocument parseReader(Reader reader, ConfigParseOptions options)

Parses a Reader into a ConfigDocument instance.

Parameters
reader:Reader

the reader to parse

options:ConfigParseOptions

parse options to control how the reader is interpreted

Returns:ConfigDocument

the parsed configuration

Exceptions
ConfigException:
on IO or parse errors
parseReaderback to summary
public static ConfigDocument parseReader(Reader reader)

Parses a reader into a Config instance as with parseReader(Reader, ConfigParseOptions) but always uses the default parse options.

Parameters
reader:Reader

the reader to parse

Returns:ConfigDocument

the parsed configuration

Exceptions
ConfigException:
on IO or parse errors
parseStringback to summary
public static ConfigDocument parseString(String s, ConfigParseOptions options)

Parses a string which should be valid HOCON or JSON.

Parameters
s:String

string to parse

options:ConfigParseOptions

parse options

Returns:ConfigDocument

the parsed configuration

parseStringback to summary
public static ConfigDocument parseString(String s)

Parses a string (which should be valid HOCON or JSON). Uses the default parse options.

Parameters
s:String

string to parse

Returns:ConfigDocument

the parsed configuration