Package com.typesafe.config.impl
Class Parseable
java.lang.Object
com.typesafe.config.impl.Parseable
- All Implemented Interfaces:
ConfigParseable
Internal implementation detail, not ABI stable, do not touch.
For use only by the
com.typesafe.config
package.
The point of this class is to avoid "propagating" each
overload on "thing which can be parsed" through multiple
interfaces. Most interfaces can have just one overload that
takes a Parseable. Also it's used as an abstract "resource
handle" in the ConfigIncluder interface.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
Internal implementation detail, not ABI stable, do not touch. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ConfigOrigin
static Parseable
newFile
(File input, ConfigParseOptions options) static Parseable
newNotFound
(String whatNotFound, String message, ConfigParseOptions options) static Parseable
newProperties
(Properties properties, ConfigParseOptions options) static Parseable
newReader
(Reader reader, ConfigParseOptions options) static Parseable
newResources
(Class<?> klass, String resource, ConfigParseOptions options) static Parseable
newResources
(String resource, ConfigParseOptions options) static Parseable
newString
(String input, ConfigParseOptions options) static Parseable
newURL
(URL input, ConfigParseOptions options) options()
Get the initial options, which can be modified then passed to parse().final ConfigOrigin
origin()
Returns aConfigOrigin
describing the origin of the parseable item.parse()
parse
(ConfigParseOptions baseOptions) Parse whatever it is.protected void
postConstruct
(ConfigParseOptions baseOptions) protected ConfigDocument
rawParseDocument
(ConfigOrigin origin, ConfigParseOptions finalOptions) protected com.typesafe.config.impl.AbstractConfigValue
rawParseValue
(ConfigOrigin origin, ConfigParseOptions finalOptions) protected abstract Reader
reader()
protected Reader
reader
(ConfigParseOptions options) toString()
protected static void
-
Constructor Details
-
Parseable
protected Parseable()
-
-
Method Details
-
postConstruct
-
reader
- Throws:
IOException
-
reader
- Throws:
IOException
-
trace
-
parse
Description copied from interface:ConfigParseable
Parse whatever it is. The options should come fromoptions()
but you could tweak them if you like.- Specified by:
parse
in interfaceConfigParseable
- Parameters:
baseOptions
- parse options, should be based on the ones fromoptions()
- Returns:
- the parsed object
-
rawParseValue
protected com.typesafe.config.impl.AbstractConfigValue rawParseValue(ConfigOrigin origin, ConfigParseOptions finalOptions) throws IOException - Throws:
IOException
-
rawParseDocument
protected ConfigDocument rawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions) throws IOException - Throws:
IOException
-
parse
-
parseConfigDocument
-
origin
Description copied from interface:ConfigParseable
Returns aConfigOrigin
describing the origin of the parseable item.- Specified by:
origin
in interfaceConfigParseable
- Returns:
- the origin of the parseable item
-
createOrigin
-
options
Description copied from interface:ConfigParseable
Get the initial options, which can be modified then passed to parse(). These options will have the right description, includer, and other parameters already set up.- Specified by:
options
in interfaceConfigParseable
- Returns:
- the initial options
-
toString
-
newNotFound
public static Parseable newNotFound(String whatNotFound, String message, ConfigParseOptions options) -
newReader
-
newString
-
newURL
-
newFile
-
newResources
-
newResources
-
newProperties
-