Package com.typesafe.config.impl
Class Parseable
- java.lang.Object
-
- com.typesafe.config.impl.Parseable
-
- All Implemented Interfaces:
ConfigParseable
public abstract class Parseable extends java.lang.Object implements ConfigParseable
Internal implementation detail, not ABI stable, do not touch. For use only by thecom.typesafe.configpackage. 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 Classes Modifier and Type Class Description protected static interfaceParseable.RelativizerInternal implementation detail, not ABI stable, do not touch.
-
Constructor Summary
Constructors Modifier Constructor Description protectedParseable()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ConfigOrigincreateOrigin()static ParseablenewFile(java.io.File input, ConfigParseOptions options)static ParseablenewNotFound(java.lang.String whatNotFound, java.lang.String message, ConfigParseOptions options)static ParseablenewProperties(java.util.Properties properties, ConfigParseOptions options)static ParseablenewReader(java.io.Reader reader, ConfigParseOptions options)static ParseablenewResources(java.lang.Class<?> klass, java.lang.String resource, ConfigParseOptions options)static ParseablenewResources(java.lang.String resource, ConfigParseOptions options)static ParseablenewString(java.lang.String input, ConfigParseOptions options)static ParseablenewURL(java.net.URL input, ConfigParseOptions options)ConfigParseOptionsoptions()Get the initial options, which can be modified then passed to parse().ConfigOriginorigin()Returns aConfigOrigindescribing the origin of the parseable item.ConfigObjectparse()ConfigObjectparse(ConfigParseOptions baseOptions)Parse whatever it is.ConfigDocumentparseConfigDocument()protected voidpostConstruct(ConfigParseOptions baseOptions)protected ConfigDocumentrawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions)protected com.typesafe.config.impl.AbstractConfigValuerawParseValue(ConfigOrigin origin, ConfigParseOptions finalOptions)protected abstract java.io.Readerreader()protected java.io.Readerreader(ConfigParseOptions options)java.lang.StringtoString()protected static voidtrace(java.lang.String message)
-
-
-
Constructor Detail
-
Parseable
protected Parseable()
-
-
Method Detail
-
postConstruct
protected void postConstruct(ConfigParseOptions baseOptions)
-
reader
protected abstract java.io.Reader reader() throws java.io.IOException
- Throws:
java.io.IOException
-
reader
protected java.io.Reader reader(ConfigParseOptions options) throws java.io.IOException
- Throws:
java.io.IOException
-
trace
protected static void trace(java.lang.String message)
-
parse
public parse(ConfigParseOptions baseOptions)
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 java.io.IOException
- Throws:
java.io.IOException
-
rawParseDocument
protected rawParseDocument(ConfigOrigin origin, ConfigParseOptions finalOptions) throws java.io.IOException
- Throws:
java.io.IOException
-
parse
public parse()
-
parseConfigDocument
public parseConfigDocument()
-
origin
public final 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
protected abstract createOrigin()
-
options
public 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newNotFound
public static newNotFound(java.lang.String whatNotFound, java.lang.String message, ConfigParseOptions options)
-
newReader
public static newReader(java.io.Reader reader, ConfigParseOptions options)
-
newString
public static newString(java.lang.String input, ConfigParseOptions options)
-
newURL
public static newURL(java.net.URL input, ConfigParseOptions options)
-
newFile
public static newFile(java.io.File input, ConfigParseOptions options)
-
newResources
public static newResources(java.lang.Class<?> klass, java.lang.String resource, ConfigParseOptions options)
-
newResources
public static newResources(java.lang.String resource, ConfigParseOptions options)
-
newProperties
public static newProperties(java.util.Properties properties, ConfigParseOptions options)
-
-