public abstract class Parseable extends Object implements ConfigParseable
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.Modifier and Type | Class and Description |
---|---|
protected static interface |
Parseable.Relativizer
Internal implementation detail, not ABI stable, do not touch.
|
Modifier | Constructor and Description |
---|---|
protected |
Parseable() |
protected void postConstruct(ConfigParseOptions baseOptions)
protected abstract Reader reader() throws IOException
IOException
protected Reader reader(ConfigParseOptions options) throws IOException
IOException
protected static void trace(String message)
public ConfigObject parse(ConfigParseOptions baseOptions)
ConfigParseable
options()
but you could tweak them if you
like.parse
in interface ConfigParseable
baseOptions
- parse options, should be based on the ones from
options()
protected com.typesafe.config.impl.AbstractConfigValue rawParseValue(ConfigOrigin origin, ConfigParseOptions finalOptions) throws IOException
IOException
protected ConfigDocument rawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions) throws IOException
IOException
public ConfigObject parse()
public ConfigDocument parseConfigDocument()
public final ConfigOrigin origin()
ConfigParseable
ConfigOrigin
describing the origin of the parseable
item.origin
in interface ConfigParseable
protected abstract ConfigOrigin createOrigin()
public ConfigParseOptions options()
ConfigParseable
options
in interface ConfigParseable
public static Parseable newNotFound(String whatNotFound, String message, ConfigParseOptions options)
public static Parseable newReader(Reader reader, ConfigParseOptions options)
public static Parseable newString(String input, ConfigParseOptions options)
public static Parseable newURL(URL input, ConfigParseOptions options)
public static Parseable newFile(File input, ConfigParseOptions options)
public static Parseable newResources(Class<?> klass, String resource, ConfigParseOptions options)
public static Parseable newResources(String resource, ConfigParseOptions options)
public static Parseable newProperties(Properties properties, ConfigParseOptions options)
Copyright © 2018 com.typesafe. All rights reserved.