Package com.typesafe.config.parser

## Class ConfigDocumentFactory

- java.lang.Object
- - com.typesafe.config.parser.ConfigDocumentFactory

    public final class ConfigDocumentFactory
    extends java.lang.Object

Factory for creating `ConfigDocument` instances.

### Constructor Summary

Constructors
`ConfigDocumentFactory()`

### Method Summary

All Methods Static Methods Concrete Methods
`static ConfigDocument` `parseFile​(java.io.File file)` Parses a file into a ConfigDocument instance as with `parseFile(File,ConfigParseOptions)` but always uses the default parse options.
`static ConfigDocument` `parseFile​(java.io.File file, ConfigParseOptions options)` Parses a file into a ConfigDocument instance.
`static ConfigDocument` `parseReader​(java.io.Reader reader)` Parses a reader into a Config instance as with `parseReader(Reader,ConfigParseOptions)` but always uses the default parse options.
`static ConfigDocument` `parseReader​(java.io.Reader reader, ConfigParseOptions options)` Parses a Reader into a ConfigDocument instance.
`static ConfigDocument` `parseString​(java.lang.String s)` Parses a string (which should be valid HOCON or JSON).
`static ConfigDocument` `parseString​(java.lang.String s, ConfigParseOptions options)` Parses a string which should be valid HOCON or JSON.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ConfigDocumentFactory

    public ConfigDocumentFactory()

### Method Detail

#### parseReader

    public static ConfigDocument parseReader​(java.io.Reader reader,
                                             ConfigParseOptions options)

Parses a Reader into a ConfigDocument instance.

Parameters:
  `reader` - the reader to parse
  `options` - parse options to control how the reader is interpreted
Returns:
  the parsed configuration
Throws:
  `ConfigException` - on IO or parse errors

#### parseReader

    public static ConfigDocument parseReader​(java.io.Reader reader)

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

Parameters:
  `reader` - the reader to parse
Returns:
  the parsed configuration
Throws:
  `ConfigException` - on IO or parse errors

#### parseFile

    public static ConfigDocument parseFile​(java.io.File file,
                                           ConfigParseOptions options)

Parses a file into a ConfigDocument instance.

Parameters:
  `file` - the file to parse
  `options` - parse options to control how the file is interpreted
Returns:
  the parsed configuration
Throws:
  `ConfigException` - on IO or parse errors

#### parseFile

    public static ConfigDocument parseFile​(java.io.File file)

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

Parameters:
  `file` - the file to parse
Returns:
  the parsed configuration
Throws:
  `ConfigException` - on IO or parse errors

#### parseString

    public static ConfigDocument parseString​(java.lang.String s,
                                             ConfigParseOptions options)

Parses a string which should be valid HOCON or JSON.

Parameters:
  `s` - string to parse
  `options` - parse options
Returns:
  the parsed configuration

#### parseString

    public static ConfigDocument parseString​(java.lang.String s)

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

Parameters:
  `s` - string to parse
Returns:
  the parsed configuration