public final class ConfigUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
joinPath(List<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 String |
joinPath(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 String |
quoteString(String s)
Quotes and escapes a string, as in the JSON specification.
|
static List<String> |
splitPath(String path)
Converts a path expression into a list of keys, by splitting on period
and unquoting the individual path elements.
|
public static String quoteString(String s)
s
- a stringpublic static String joinPath(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 String joinPath(List<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 List<String> splitPath(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 invalidCopyright © 2018 com.typesafe. All rights reserved.