To workaround missing implementation in Scala.js
This exists because sometimes null is not the same as missing.
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.
ConfigReference replaces ConfigReference (the older class kept for back compat) and represents the ${} substitution syntax.
ConfigReference replaces ConfigReference (the older class kept for back compat) and represents the ${} substitution syntax. It can resolve to any kind of value.
An AbstractConfigValue which contains other values.
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.
The key used to memoize already-traversed nodes when resolving substitutions
To workaround missing implementation in Scala.js
To workaround missing implementation in Scala.js
To workaround missing implementation in Scala.js
Implemented by a merge stack (ConfigDelayedMerge, ConfigDelayedMergeObject) that replaces itself during substitution resolution in order to implement "look backwards only" semantics.
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.
Status of substitution resolution.
To workaround missing implementation in Scala.js
Interface that tags a ConfigValue that is not mergeable until after substitutions are resolved.
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 ConfigSubstitution
and
ConfigDelayedMerge
.
To workaround missing implementation in Scala.js
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.
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 terrible Map that isn't as expensive as HashMap to copy and add one item to.
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.
Internal implementation detail, not ABI stable, do not touch.
Internal implementation detail, not ABI stable, do not touch.
For use only by the org.ekrich.config
package.
A ConfigConcatenation represents a list of values to be concatenated (see the spec).
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.
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.
The issue here is that we want to first merge our stack of config files, and then we want to evaluate substitutions.
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.
Internal implementation detail, not ABI stable, do not touch.
Internal implementation detail, not ABI stable, do not touch.
For use only by the org.ekrich.config
package.
Internal implementation detail, not ABI stable, do not touch.
Internal implementation detail, not ABI stable, do not touch.
For use only by the org.ekrich.config
package.
Default automatic type transformations.
Internal implementation detail, not ABI stable, do not touch.
Internal implementation detail, not ABI stable, do not touch.
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.
This class is the source for values for a substitution like ${foo}
.
Deliberately shoving all the serialization code into this class instead of doing it OO-style with each subclass.
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.
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.
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.