|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.yaml.snakeyaml.DumperOptions
public class DumperOptions
Nested Class Summary | |
---|---|
static class |
DumperOptions.FlowStyle
Block styles use indentation to denote nesting and scope within the document. |
static class |
DumperOptions.LineBreak
Platform dependent line break. |
static class |
DumperOptions.ScalarStyle
YAML provides a rich set of scalar styles. |
static class |
DumperOptions.Version
Specification version. |
Constructor Summary | |
---|---|
DumperOptions()
|
Method Summary | |
---|---|
DumperOptions.ScalarStyle |
calculateScalarStyle(ScalarAnalysis analysis,
DumperOptions.ScalarStyle style)
Deprecated. it was implemented as a quick fix for issue 29 |
DumperOptions.FlowStyle |
getDefaultFlowStyle()
|
DumperOptions.ScalarStyle |
getDefaultScalarStyle()
|
Tag |
getExplicitRoot()
Deprecated. do not use explicit root Tag |
int |
getIndent()
|
DumperOptions.LineBreak |
getLineBreak()
|
Map<String,String> |
getTags()
|
TimeZone |
getTimeZone()
|
DumperOptions.Version |
getVersion()
|
int |
getWidth()
|
boolean |
isAllowReadOnlyProperties()
Report whether read-only JavaBean properties (the ones without setters) should be included in the YAML document |
boolean |
isAllowUnicode()
|
boolean |
isCanonical()
|
boolean |
isExplicitEnd()
|
boolean |
isExplicitStart()
|
boolean |
isPrettyFlow()
|
void |
setAllowReadOnlyProperties(boolean allowReadOnlyProperties)
Set to true to include read-only JavaBean properties (the ones without setters) in the YAML document. |
void |
setAllowUnicode(boolean allowUnicode)
Specify whether to emit non-ASCII printable Unicode characters (to support ASCII terminals). |
void |
setCanonical(boolean canonical)
Force the emitter to produce a canonical YAML document. |
void |
setDefaultFlowStyle(DumperOptions.FlowStyle defaultFlowStyle)
|
void |
setDefaultScalarStyle(DumperOptions.ScalarStyle defaultStyle)
Set default style for scalars. |
void |
setExplicitEnd(boolean explicitEnd)
|
void |
setExplicitRoot(String expRoot)
Deprecated. use Tag instead of String |
void |
setExplicitRoot(Tag expRoot)
Deprecated. do not use explicit root Tag |
void |
setExplicitStart(boolean explicitStart)
|
void |
setIndent(int indent)
|
void |
setLineBreak(DumperOptions.LineBreak lineBreak)
Specify the line break to separate the lines. |
void |
setPrettyFlow(boolean prettyFlow)
Force the emitter to produce a pretty YAML document when using the flow style. |
void |
setTags(Map<String,String> tags)
|
void |
setTimeZone(TimeZone timeZone)
Set the timezone to be used for Date. |
void |
setVersion(DumperOptions.Version version)
|
void |
setWidth(int bestWidth)
Specify the preferred width to emit scalars. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DumperOptions()
Method Detail |
---|
public boolean isAllowUnicode()
public void setAllowUnicode(boolean allowUnicode)
allowUnicode
- if allowUnicode is false then all non-ASCII characters are
escapedpublic DumperOptions.ScalarStyle getDefaultScalarStyle()
public void setDefaultScalarStyle(DumperOptions.ScalarStyle defaultStyle)
defaultStyle
- set the style for all scalarspublic void setIndent(int indent)
public int getIndent()
public void setVersion(DumperOptions.Version version)
public DumperOptions.Version getVersion()
public void setCanonical(boolean canonical)
canonical
- true produce canonical YAML documentpublic boolean isCanonical()
public void setPrettyFlow(boolean prettyFlow)
prettyFlow
- true produce pretty flow YAML documentpublic boolean isPrettyFlow()
public void setWidth(int bestWidth)
bestWidth
- the preferred with for scalars.public int getWidth()
public DumperOptions.LineBreak getLineBreak()
public void setDefaultFlowStyle(DumperOptions.FlowStyle defaultFlowStyle)
public DumperOptions.FlowStyle getDefaultFlowStyle()
public Tag getExplicitRoot()
public void setExplicitRoot(String expRoot)
expRoot
- tag to be used for the root node. (JavaBeans may use
Tag.MAP="tag:yaml.org,2002:map")public void setExplicitRoot(Tag expRoot)
expRoot
- tag to be used for the root node. (JavaBeans may use
Tag.MAP="tag:yaml.org,2002:map")public void setLineBreak(DumperOptions.LineBreak lineBreak)
public boolean isExplicitStart()
public void setExplicitStart(boolean explicitStart)
public boolean isExplicitEnd()
public void setExplicitEnd(boolean explicitEnd)
public Map<String,String> getTags()
public void setTags(Map<String,String> tags)
public DumperOptions.ScalarStyle calculateScalarStyle(ScalarAnalysis analysis, DumperOptions.ScalarStyle style)
analysis
- - Scalar meta datastyle
- - automatically detected style
public boolean isAllowReadOnlyProperties()
public void setAllowReadOnlyProperties(boolean allowReadOnlyProperties)
allowReadOnlyProperties
- - true to dump read-only JavaBean propertiespublic TimeZone getTimeZone()
public void setTimeZone(TimeZone timeZone)
null
UTC is
used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |