org.ekrich.config.impl
package org.ekrich.config.impl
Type members
Classlikes
abstract class AbstractConfigObject(_origin: ConfigOrigin) extends AbstractConfigValue with ConfigObject with Container
- Companion
- object
object AbstractConfigValue
Trying very hard to avoid a parent reference in config values; when you have
a tree like this, the availability of parent() tends to result in a lot of
improperly-factored and non-modular code. Please don't add parent().
a tree like this, the availability of parent() tends to result in a lot of
improperly-factored and non-modular code. Please don't add parent().
- Companion
- class
object BadMap
A terrible Map that isn't as expensive as HashMap to copy and
add one item to. Please write something real if you see this
and get cranky.
add one item to. Please write something real if you see this
and get cranky.
- Companion
- class
@SerialVersionUID(2L)
final class ConfigBoolean(origin: ConfigOrigin, val value: Boolean) extends AbstractConfigValue with Serializable
object ConfigConcatenation
A ConfigConcatenation represents a list of values to be concatenated (see the
spec). It only has to exist if at least one value is an unresolved
substitution, otherwise we could go ahead and collapse the list into a single
value.
spec). It only has to exist if at least one value is an unresolved
substitution, otherwise we could go ahead and collapse the list into a single
value.
Right now this is always a list of strings and ${} references, but in the
future should support a list of ConfigList. We may also support
concatenations of objects, but ConfigDelayedMerge should be used for that
since a concat of objects really will merge, not concatenate.
future should support a list of ConfigList. We may also support
concatenations of objects, but ConfigDelayedMerge should be used for that
since a concat of objects really will merge, not concatenate.
- Companion
- class
final class ConfigConcatenation(_origin: ConfigOrigin, val pieces: List[AbstractConfigValue]) extends AbstractConfigValue with Unmergeable with Container
- Companion
- object
object ConfigDelayedMerge
The issue here is that we want to first merge our stack of config files, and
then we want to evaluate substitutions. But if two substitutions both expand
to an object, we might need to merge those two objects. Thus, we can't ever
"override" a substitution when we do a merge; instead we have to save the
stack of values that should be merged, and resolve the merge when we evaluate
substitutions.
then we want to evaluate substitutions. But if two substitutions both expand
to an object, we might need to merge those two objects. Thus, we can't ever
"override" a substitution when we do a merge; instead we have to save the
stack of values that should be merged, and resolve the merge when we evaluate
substitutions.
- Companion
- class
final class ConfigDelayedMerge(_origin: ConfigOrigin, val stack: List[AbstractConfigValue]) extends AbstractConfigValue with Unmergeable with ReplaceableMergeStack
- Companion
- object
final class ConfigDelayedMergeObject(_origin: ConfigOrigin, val stack: List[AbstractConfigValue]) extends AbstractConfigObject with Unmergeable with ReplaceableMergeStack
- Companion
- object
@SerialVersionUID(2L)
final class ConfigDouble(origin: ConfigOrigin, val value: Double, originalText: String) extends ConfigNumber with Serializable
object ConfigImpl
Internal implementation detail, not ABI stable, do not touch.
For use only by the
For use only by the
[[org.ekrich.config]]
package. object ConfigImplUtil
Internal implementation detail, not ABI stable, do not touch.
For use only by the
For use only by the
[[org.ekrich.config]]
package.@SerialVersionUID(2L)
final class ConfigInt(origin: ConfigOrigin, val value: Int, originalText: String) extends ConfigNumber with Serializable
@SerialVersionUID(2L)
final class ConfigLong(origin: ConfigOrigin, val value: Long, originalText: String) extends ConfigNumber with Serializable
abstract class ConfigNodeComplexValue(_children: Collection[AbstractConfigNode]) extends AbstractConfigNodeValue
final class ConfigNodeInclude(val children: Collection[AbstractConfigNode], val kind: ConfigIncludeKind, val isRequired: Boolean) extends AbstractConfigNode
@SerialVersionUID(2L)
This exists because sometimes null is not the same as missing. Specifically,
if a value is set to null we can give a better error message (indicating
where it was set to null) in case someone asks for the value. Also, null
overrides values set "earlier" in the search path, while missing values do
not.
if a value is set to null we can give a better error message (indicating
where it was set to null) in case someone asks for the value. Also, null
overrides values set "earlier" in the search path, while missing values do
not.
@SerialVersionUID(2L)
abstract class ConfigNumber(_origin: ConfigOrigin, val originalText: String) extends AbstractConfigValue with Serializable
- Companion
- object
final class ConfigReference(_origin: ConfigOrigin, val expression: SubstitutionExpression, val prefixLength: Int) extends AbstractConfigValue with Unmergeable
ConfigReference replaces ConfigReference (the older class kept for back
compat) and represents the ${} substitution syntax. It can resolve to any
kind of value.
compat) and represents the ${} substitution syntax. It can resolve to any
kind of value.
@SerialVersionUID(2L)
abstract class ConfigString(origin: ConfigOrigin, val value: String) extends AbstractConfigValue with Serializable
- Companion
- object
An AbstractConfigValue which contains other values. Java has no way to
express "this has to be an AbstractConfigValue also" other than making
AbstractConfigValue an interface which would be aggravating. But we can say
we are a ConfigValue.
express "this has to be an AbstractConfigValue also" other than making
AbstractConfigValue an interface which would be aggravating. But we can say
we are a ConfigValue.
trait FullIncluder extends ConfigIncluder with ConfigIncluderFile with ConfigIncluderURL with ConfigIncluderClasspath
object Parseable
Internal implementation detail, not ABI stable, do not touch.
For use only by the
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.
For use only by the
[[org.ekrich.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.
- Companion
- class
Implemented by a merge stack (ConfigDelayedMerge, ConfigDelayedMergeObject)
that replaces itself during substitution resolution in order to implement
"look backwards only" semantics.
that replaces itself during substitution resolution in order to implement
"look backwards only" semantics.
final class ResolveMemos
This exists because we have to memoize resolved substitutions as we go
through the config tree; otherwise we could end up creating multiple copies
of values or whole trees of values as we follow chains of substitutions.
through the config tree; otherwise we could end up creating multiple copies
of values or whole trees of values as we follow chains of substitutions.
object ResolveSource
This class is the source for values for a substitution like
${foo}
.- Companion
- class
@SerialVersionUID(1L)
object SerializedConfigValue
Deliberately shoving all the serialization code into this class instead of
doing it OO-style with each subclass. Seems better to have it all in one
place. This class implements a lame serialization format that supports
skipping unknown fields, so it's moderately more extensible than the default
Java serialization format.
doing it OO-style with each subclass. Seems better to have it all in one
place. This class implements a lame serialization format that supports
skipping unknown fields, so it's moderately more extensible than the default
Java serialization format.
- Companion
- class
@SerialVersionUID(1L)
object SimpleConfig
One thing to keep in mind in the future: as Collection-like APIs are added
here, including iterators or size() or anything, they should be consistent
with a one-level java.util.Map from paths to non-null values. Null values are
not "in" the map.
here, including iterators or size() or anything, they should be consistent
with a one-level java.util.Map from paths to non-null values. Null values are
not "in" the map.
- Companion
- class
@SerialVersionUID(2L)
final class SimpleConfigList(_origin: ConfigOrigin, val value: List[AbstractConfigValue], status: ResolveStatus) extends AbstractConfigValue with ConfigList with Container with Serializable
- Companion
- object
@SerialVersionUID(2L)
final class SimpleConfigObject(_origin: ConfigOrigin, val value: Map[String, AbstractConfigValue], val status: ResolveStatus, val ignoresFallbacks: Boolean) extends AbstractConfigObject with Serializable
- Companion
- object
class SimpleIncludeContext(parseable: Parseable, options: ConfigParseOptions) extends ConfigIncludeContext
trait Unmergeable
Interface that tags a ConfigValue that is not mergeable until after
substitutions are resolved. Basically these are special ConfigValue that
never appear in a resolved tree, like
substitutions are resolved. Basically these are special ConfigValue that
never appear in a resolved tree, like
ConfigSubstitution
and[[ConfigDelayedMerge]]
.