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 classSafeRepresenter.IteratorWrapperprotected classSafeRepresenter.RepresentArrayprotected classSafeRepresenter.RepresentBooleanprotected classSafeRepresenter.RepresentByteArrayprotected classSafeRepresenter.RepresentDateprotected classSafeRepresenter.RepresentEnumprotected classSafeRepresenter.RepresentIteratorprotected classSafeRepresenter.RepresentListprotected classSafeRepresenter.RepresentMapprotected classSafeRepresenter.RepresentNullprotected classSafeRepresenter.RepresentNumberprotected classSafeRepresenter.RepresentPrimitiveArrayRepresents primitive arrays, such as short[] and float[], by converting them into equivalent Listand List using the appropriate autoboxing type. protected classSafeRepresenter.RepresentSetprotected classSafeRepresenter.RepresentStringprotected classSafeRepresenter.RepresentUuid
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Class<? extends java.lang.Object>,Tag>classTagsprivate static java.util.regex.PatternMULTILINE_PATTERNprotected DumperOptions.NonPrintableStylenonPrintableStyleprotected java.util.TimeZonetimeZone-
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 TagaddClassTag(java.lang.Class<? extends java.lang.Object> clazz, Tag tag)Define a tag for theClassto serialize.protected TaggetTag(java.lang.Class<?> clazz, Tag defaultTag)java.util.TimeZonegetTimeZone()voidsetTimeZone(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 theClassto serialize.- Parameters:
clazz-Classwhich 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)
-
-