|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.typesafe.config.impl.Parseable
public abstract class Parseable
This is public but it's only for use by the config package; DO NOT TOUCH. 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.
| Constructor Summary | |
|---|---|
protected |
Parseable()
|
| Method Summary | |
|---|---|
protected abstract ConfigOrigin |
createOrigin()
|
static Parseable |
newFile(java.io.File input,
ConfigParseOptions options)
|
static Parseable |
newNotFound(java.lang.String whatNotFound,
java.lang.String message,
ConfigParseOptions options)
|
static Parseable |
newProperties(java.util.Properties properties,
ConfigParseOptions options)
|
static Parseable |
newReader(java.io.Reader reader,
ConfigParseOptions options)
note that we will never close this reader; you have to do it when parsing is complete. |
static Parseable |
newResources(java.lang.Class<?> klass,
java.lang.String resource,
ConfigParseOptions options)
|
static Parseable |
newResources(java.lang.String resource,
ConfigParseOptions options)
|
static Parseable |
newString(java.lang.String input,
ConfigParseOptions options)
|
static Parseable |
newURL(java.net.URL input,
ConfigParseOptions options)
|
ConfigParseOptions |
options()
Get the initial options, which can be modified then passed to parse(). |
ConfigOrigin |
origin()
Returns a ConfigOrigin describing the origin of the parseable
item. |
ConfigObject |
parse()
|
ConfigObject |
parse(ConfigParseOptions baseOptions)
Parse whatever it is. |
protected void |
postConstruct(ConfigParseOptions baseOptions)
|
protected com.typesafe.config.impl.AbstractConfigValue |
rawParseValue(ConfigOrigin origin,
ConfigParseOptions finalOptions)
|
protected com.typesafe.config.impl.AbstractConfigValue |
rawParseValue(java.io.Reader reader,
ConfigOrigin origin,
ConfigParseOptions finalOptions)
|
protected abstract java.io.Reader |
reader()
|
java.lang.String |
toString()
|
protected static void |
trace(java.lang.String message)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Parseable()
| Method Detail |
|---|
protected void postConstruct(ConfigParseOptions baseOptions)
protected abstract java.io.Reader reader()
throws java.io.IOException
java.io.IOExceptionprotected static void trace(java.lang.String message)
public ConfigObject parse(ConfigParseOptions baseOptions)
ConfigParseableoptions() but you could tweak them if you
like.
parse in interface ConfigParseablebaseOptions - parse options, should be based on the ones from
options()
protected com.typesafe.config.impl.AbstractConfigValue rawParseValue(ConfigOrigin origin,
ConfigParseOptions finalOptions)
throws java.io.IOException
java.io.IOException
protected com.typesafe.config.impl.AbstractConfigValue rawParseValue(java.io.Reader reader,
ConfigOrigin origin,
ConfigParseOptions finalOptions)
throws java.io.IOException
java.io.IOExceptionpublic ConfigObject parse()
public final ConfigOrigin origin()
ConfigParseableConfigOrigin describing the origin of the parseable
item.
origin in interface ConfigParseableprotected abstract ConfigOrigin createOrigin()
public ConfigParseOptions options()
ConfigParseable
options in interface ConfigParseablepublic java.lang.String toString()
toString in class java.lang.Object
public static Parseable newNotFound(java.lang.String whatNotFound,
java.lang.String message,
ConfigParseOptions options)
public static Parseable newReader(java.io.Reader reader,
ConfigParseOptions options)
public static Parseable newString(java.lang.String input,
ConfigParseOptions options)
public static Parseable newURL(java.net.URL input,
ConfigParseOptions options)
public static Parseable newFile(java.io.File input,
ConfigParseOptions options)
public static Parseable newResources(java.lang.Class<?> klass,
java.lang.String resource,
ConfigParseOptions options)
public static Parseable newResources(java.lang.String resource,
ConfigParseOptions options)
public static Parseable newProperties(java.util.Properties properties,
ConfigParseOptions options)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||