|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.typesafe.config.ConfigRenderOptions
public final class ConfigRenderOptions
A set of options related to rendering a ConfigValue
. Passed to
ConfigValue.render(ConfigRenderOptions)
.
Here is an example of creating a ConfigRenderOptions
:
ConfigRenderOptions options = ConfigRenderOptions.defaults().setComments(false)
Method Summary | |
---|---|
static ConfigRenderOptions |
concise()
Returns concise render options (no whitespace or comments). |
static ConfigRenderOptions |
defaults()
Returns the default render options which are verbose (commented and formatted). |
boolean |
getComments()
Returns whether the options enable comments. |
boolean |
getFormatted()
Returns whether the options enable formatting. |
boolean |
getOriginComments()
Returns whether the options enable automated origin comments. |
ConfigRenderOptions |
setComments(boolean value)
Returns options with comments toggled. |
ConfigRenderOptions |
setFormatted(boolean value)
Returns options with formatting toggled. |
ConfigRenderOptions |
setOriginComments(boolean value)
Returns options with origin comments toggled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ConfigRenderOptions defaults()
concise()
for stripped-down
options. This rendering will not be valid JSON since it has comments.
public static ConfigRenderOptions concise()
Config
, the concise rendering will be valid JSON.
public ConfigRenderOptions setComments(boolean value)
setOriginComments(boolean)
.
value
- true to include comments in the render
public boolean getComments()
public ConfigRenderOptions setOriginComments(boolean value)
ConfigValue.origin()
of that setting's value. For example these
comments might tell you which file a setting comes from.
setOriginComments()
controls only these autogenerated
"origin of this setting" comments, to toggle regular comments use
setComments(boolean)
.
value
- true to include autogenerated setting-origin comments in the
render
public boolean getOriginComments()
public ConfigRenderOptions setFormatted(boolean value)
value
- true to include comments in the render
public boolean getFormatted()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |