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 interfaceInternal implementation detail, not ABI stable, do not touch. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ConfigOriginstatic ParseablenewFile(File input, ConfigParseOptions options) static ParseablenewNotFound(String whatNotFound, String message, ConfigParseOptions options) static ParseablenewProperties(Properties properties, ConfigParseOptions options) static ParseablenewReader(Reader reader, ConfigParseOptions options) static ParseablenewResources(Class<?> klass, String resource, ConfigParseOptions options) static ParseablenewResources(String resource, ConfigParseOptions options) static ParseablenewString(String input, ConfigParseOptions options) static ParseablenewURL(URL input, ConfigParseOptions options) options()Get the initial options, which can be modified then passed to parse().final ConfigOriginorigin()Returns aConfigOrigindescribing the origin of the parseable item.parse()parse(ConfigParseOptions baseOptions) Parse whatever it is.protected voidpostConstruct(ConfigParseOptions baseOptions) protected ConfigDocumentrawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions) protected com.typesafe.config.impl.AbstractConfigValuerawParseValue(ConfigOrigin origin, ConfigParseOptions finalOptions) protected abstract Readerreader()protected Readerreader(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:ConfigParseableParse whatever it is. The options should come fromoptions()but you could tweak them if you like.- Specified by:
parsein 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:ConfigParseableReturns aConfigOrigindescribing the origin of the parseable item.- Specified by:
originin interfaceConfigParseable- Returns:
- the origin of the parseable item
-
createOrigin
-
options
Description copied from interface:ConfigParseableGet 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:
optionsin interfaceConfigParseable- Returns:
- the initial options
-
toString
-
newNotFound
public static Parseable newNotFound(String whatNotFound, String message, ConfigParseOptions options) -
newReader
-
newString
-
newURL
-
newFile
-
newResources
-
newResources
-
newProperties
-