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 private static class
StandardRepresenter.IteratorWrapper
class
StandardRepresenter.RepresentArray
Create Node for Object[]class
StandardRepresenter.RepresentBoolean
Create Node for Booleanclass
StandardRepresenter.RepresentByteArray
Create Node for byte[]class
StandardRepresenter.RepresentEnum
Create eNode for Enumsclass
StandardRepresenter.RepresentIterator
Create Node for Iteratorclass
StandardRepresenter.RepresentList
Create Node for Listclass
StandardRepresenter.RepresentMap
Create Node for Map instanceprotected class
StandardRepresenter.RepresentNull
Create null Nodeclass
StandardRepresenter.RepresentNumber
Create Node for Byte, Short, Integer, Long, BigIntegerclass
StandardRepresenter.RepresentOptional
Create Node for Optional instance (the value of null)class
StandardRepresenter.RepresentPrimitiveArray
Represents primitive arrays, such as short[] and float[], by converting them into equivalentList
using the appropriate autoboxing type.class
StandardRepresenter.RepresentSet
Create Node for Set instancesclass
StandardRepresenter.RepresentString
Create Node for Stringclass
StandardRepresenter.RepresentUuid
Create Node for UUID
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Class<? extends java.lang.Object>,Tag>
classTags
Connect classes to their tagsstatic java.util.regex.Pattern
MULTILINE_PATTERN
all chars that represent a new lineprotected DumpSettings
settings
keep 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 Tag
addClassTag(java.lang.Class<? extends java.lang.Object> clazz, Tag tag)
Deprecated.should be replaced with the Beans projectprotected Tag
getTag(java.lang.Class<?> clazz, 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 java.util.regex.Pattern MULTILINE_PATTERN
all chars that represent a new line
-
classTags
protected java.util.Map<java.lang.Class<? extends java.lang.Object>,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 Tag getTag(java.lang.Class<?> clazz, 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 Tag addClassTag(java.lang.Class<? extends java.lang.Object> clazz, Tag tag)
Deprecated.should be replaced with the Beans projectDefine a tag for theClass
to serialize. Should be replaced later with the beans project.- 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
-
-