|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.yamlbeans.YamlConfig.WriteConfig
public static class YamlConfig.WriteConfig
Method Summary | |
---|---|
void |
setAlwaysWriteClassname(boolean write)
If true, class name tags will always be output. |
void |
setAutoAnchor(boolean autoAnchor)
If true, values that are referenced multiple times will use an anchor. |
void |
setCanonical(boolean canonical)
If true, the YAML output will be canonical. |
void |
setEscapeUnicode(boolean escapeUnicode)
If false, unicode characters will be output instead of the escaped unicode character code. |
void |
setExplicitFirstDocument(boolean explicitFirstDocument)
If true, the first document will have a document start token (---). |
void |
setIndentSize(int indentSize)
Sets the number of spaces to indent. |
void |
setUseVerbatimTags(boolean useVerbatimTags)
If false, tags will never be surrounded by angle brackets (eg, "! |
void |
setVersion(Version version)
Sets the YAML version to output. |
void |
setWrapColumn(int wrapColumn)
Sets the column at which values will attempt to wrap. |
void |
setWriteDefaultValues(boolean writeDefaultValues)
If false, object fields with default values will not be written. |
void |
setWriteRootElementTags(boolean writeRootElementTags)
If true, the elements of a Collection or Map root for each YAML document will have a tag defining the class that was written, if necessary. |
void |
setWriteRootTags(boolean writeRootTags)
If true, the root of each YAML document will have a tag defining the class that was written, if necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setExplicitFirstDocument(boolean explicitFirstDocument)
public void setWriteRootTags(boolean writeRootTags)
ArrayList
, or HashMap
. It is useful to set this to false when
planning to read the object with the YamlReader.read(Class)
method. Default is true.
public void setWriteRootElementTags(boolean writeRootElementTags)
ArrayList
, or HashMap
. It is
useful to set this to false when planning to read the object with the YamlReader.read(Class, Class)
method.
Default is true.
public void setWriteDefaultValues(boolean writeDefaultValues)
public void setAutoAnchor(boolean autoAnchor)
YamlWriter.write(Object)
). When true, objects are not actually written until
YamlWriter.clearAnchors()
or YamlWriter.close()
is called. If changing auto anchor to false,
YamlWriter.clearAnchors()
should be called first to output any buffered objects. Default is true.
public void setVersion(Version version)
public void setCanonical(boolean canonical)
public void setIndentSize(int indentSize)
public void setWrapColumn(int wrapColumn)
public void setUseVerbatimTags(boolean useVerbatimTags)
public void setEscapeUnicode(boolean escapeUnicode)
public void setAlwaysWriteClassname(boolean write)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |