Class StandardRepresenter
- java.lang.Object
-
- org.snakeyaml.engine.v2.representer.BaseRepresenter
-
- org.snakeyaml.engine.v2.representer.StandardRepresenter
-
public class StandardRepresenter extends BaseRepresenter
Represent standard Java classes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classStandardRepresenter.RepresentArrayCreate Node for Object[]classStandardRepresenter.RepresentBooleanCreate Node for BooleanclassStandardRepresenter.RepresentByteArrayCreate Node for byte[]classStandardRepresenter.RepresentEnumCreate eNode for EnumsclassStandardRepresenter.RepresentIteratorCreate Node for IteratorclassStandardRepresenter.RepresentListCreate Node for ListclassStandardRepresenter.RepresentMapCreate Node for Map instanceprotected classStandardRepresenter.RepresentNullCreate null NodeclassStandardRepresenter.RepresentNumberCreate Node for Byte, Short, Integer, Long, BigIntegerclassStandardRepresenter.RepresentOptionalCreate Node for Optional instance (the value of null)classStandardRepresenter.RepresentPrimitiveArrayRepresents primitive arrays, such as short[] and float[], by converting them into equivalentListusing the appropriate autoboxing type.classStandardRepresenter.RepresentSetCreate Node for Set instancesclassStandardRepresenter.RepresentStringCreate Node for StringclassStandardRepresenter.RepresentUuidCreate Node for UUID
-
Field Summary
Fields Modifier and Type Field Description protected Map<Class<? extends Object>,org.snakeyaml.engine.v2.nodes.Tag>classTagsConnect classes to their tagsstatic PatternMULTILINE_PATTERNall chars that represent a new lineprotected DumpSettingssettingskeep the options-
Fields inherited from class org.snakeyaml.engine.v2.representer.BaseRepresenter
defaultFlowStyle, defaultScalarStyle, nullRepresenter, objectToRepresent, parentClassRepresenters, representedObjects, representers
-
-
Constructor Summary
Constructors Constructor Description StandardRepresenter(DumpSettings settings)Create
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.snakeyaml.engine.v2.nodes.TagaddClassTag(Class<? extends Object> clazz, org.snakeyaml.engine.v2.nodes.Tag tag)Deprecated.should be replaced with the Beans projectprotected org.snakeyaml.engine.v2.nodes.TaggetTag(Class<?> clazz, org.snakeyaml.engine.v2.nodes.Tag defaultTag)Define the way to get the Tag for any class-
Methods inherited from class org.snakeyaml.engine.v2.representer.BaseRepresenter
findRepresenterFor, represent, representData, representMapping, representMappingEntry, representScalar, representScalar, representSequence
-
-
-
-
Field Detail
-
MULTILINE_PATTERN
public static final Pattern MULTILINE_PATTERN
all chars that represent a new line
-
classTags
protected Map<Class<? extends Object>,org.snakeyaml.engine.v2.nodes.Tag> classTags
Connect classes to their tags
-
settings
protected DumpSettings settings
keep the options
-
-
Constructor Detail
-
StandardRepresenter
public StandardRepresenter(DumpSettings settings)
Create- Parameters:
settings- - configuration options
-
-
Method Detail
-
getTag
protected org.snakeyaml.engine.v2.nodes.Tag getTag(Class<?> clazz, org.snakeyaml.engine.v2.nodes.Tag defaultTag)
Define the way to get the Tag for any class- Parameters:
clazz- - the class to serialisedefaultTag- - the tag to use if there is no explicit configuration- Returns:
- the Tag for output
-
addClassTag
@Deprecated public org.snakeyaml.engine.v2.nodes.Tag addClassTag(Class<? extends Object> clazz, org.snakeyaml.engine.v2.nodes.Tag tag)
Deprecated.should be replaced with the Beans projectDefine a tag for theClassto serialize. Should be replaced later with the beans project.- 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
-
-