public final class ConfigUtil extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
joinPath(java.util.List<java.lang.String> elements)
Converts a list of strings to a path expression, by quoting the path
elements as needed and then joining them separated by a period.
|
static java.lang.String |
joinPath(java.lang.String... elements)
Converts a list of keys to a path expression, by quoting the path
elements as needed and then joining them separated by a period.
|
static java.lang.String |
quoteString(java.lang.String s)
Quotes and escapes a string, as in the JSON specification.
|
static java.util.List<java.lang.String> |
splitPath(java.lang.String path)
Converts a path expression into a list of keys, by splitting on period
and unquoting the individual path elements.
|
public static java.lang.String quoteString(java.lang.String s)
s - a stringpublic static java.lang.String joinPath(java.lang.String... elements)
Config, while individual path
elements are usable with a ConfigObject.
See the overview documentation for Config for more detail on path
expressions vs. keys.
elements - the keys in the pathConfigException - if there are no elementspublic static java.lang.String joinPath(java.util.List<java.lang.String> elements)
Config, while individual path
elements are usable with a ConfigObject.
See the overview documentation for Config for more detail on path
expressions vs. keys.
elements - the keys in the pathConfigException - if the list is emptypublic static java.util.List<java.lang.String> splitPath(java.lang.String path)
Config, while individual path elements are usable with a
ConfigObject.
See the overview documentation for Config for more detail on path
expressions vs. keys.
path - a path expressionConfigException - if the path expression is invalid