Package org.yaml.snakeyaml.representer
Class SafeRepresenter
- java.lang.Object
-
- org.yaml.snakeyaml.representer.BaseRepresenter
-
- org.yaml.snakeyaml.representer.SafeRepresenter
-
- Direct Known Subclasses:
Representer
class SafeRepresenter extends BaseRepresenter
Represent standard Java classes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SafeRepresenter.IteratorWrapper
protected class
SafeRepresenter.RepresentArray
protected class
SafeRepresenter.RepresentBoolean
protected class
SafeRepresenter.RepresentByteArray
protected class
SafeRepresenter.RepresentDate
protected class
SafeRepresenter.RepresentEnum
protected class
SafeRepresenter.RepresentIterator
protected class
SafeRepresenter.RepresentList
protected class
SafeRepresenter.RepresentMap
protected class
SafeRepresenter.RepresentNull
protected class
SafeRepresenter.RepresentNumber
protected class
SafeRepresenter.RepresentPrimitiveArray
Represents primitive arrays, such as short[] and float[], by converting them into equivalent Listand List using the appropriate autoboxing type. protected class
SafeRepresenter.RepresentSet
protected class
SafeRepresenter.RepresentString
protected class
SafeRepresenter.RepresentUuid
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Class<? extends java.lang.Object>,Tag>
classTags
private static java.util.regex.Pattern
MULTILINE_PATTERN
protected DumperOptions.NonPrintableStyle
nonPrintableStyle
protected java.util.TimeZone
timeZone
-
Fields inherited from class org.yaml.snakeyaml.representer.BaseRepresenter
defaultFlowStyle, defaultScalarStyle, multiRepresenters, nullRepresenter, objectToRepresent, representedObjects, representers
-
-
Constructor Summary
Constructors Constructor Description SafeRepresenter()
SafeRepresenter(DumperOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tag
addClassTag(java.lang.Class<? extends java.lang.Object> clazz, Tag tag)
Define a tag for theClass
to serialize.protected Tag
getTag(java.lang.Class<?> clazz, Tag defaultTag)
java.util.TimeZone
getTimeZone()
void
setTimeZone(java.util.TimeZone timeZone)
-
Methods inherited from class org.yaml.snakeyaml.representer.BaseRepresenter
getDefaultFlowStyle, getDefaultScalarStyle, getPropertyUtils, isExplicitPropertyUtils, represent, representData, representMapping, representScalar, representScalar, representSequence, setDefaultFlowStyle, setDefaultScalarStyle, setPropertyUtils
-
-
-
-
Field Detail
-
classTags
protected java.util.Map<java.lang.Class<? extends java.lang.Object>,Tag> classTags
-
timeZone
protected java.util.TimeZone timeZone
-
nonPrintableStyle
protected DumperOptions.NonPrintableStyle nonPrintableStyle
-
MULTILINE_PATTERN
private static final java.util.regex.Pattern MULTILINE_PATTERN
-
-
Constructor Detail
-
SafeRepresenter
public SafeRepresenter()
-
SafeRepresenter
public SafeRepresenter(DumperOptions options)
-
-
Method Detail
-
addClassTag
public Tag addClassTag(java.lang.Class<? extends java.lang.Object> clazz, Tag tag)
Define a tag for theClass
to serialize.- Parameters:
clazz
-Class
which tag is changedtag
- new tag to be used for every instance of the specifiedClass
- Returns:
- the previous tag associated with the
Class
-
getTimeZone
public java.util.TimeZone getTimeZone()
-
setTimeZone
public void setTimeZone(java.util.TimeZone timeZone)
-
-