Package org.yaml.snakeyaml.representer
Class BaseRepresenter
java.lang.Object
org.yaml.snakeyaml.representer.BaseRepresenter
- Direct Known Subclasses:
Representer
public abstract class BaseRepresenter
extends java.lang.Object
Represent basic YAML structures: scalar, sequence, mapping
-
Field Summary
Fields Modifier and Type Field Description protected DumperOptions.FlowStyledefaultFlowStyleprotected DumperOptions.ScalarStyledefaultScalarStyleprotected java.util.Map<java.lang.Class<?>,Represent>multiRepresentersprotected RepresentnullRepresenterin Java 'null' is not a type.protected java.lang.ObjectobjectToRepresentprotected java.util.Map<java.lang.Object,Node>representedObjectsprotected java.util.Map<java.lang.Class<?>,Represent>representers -
Constructor Summary
Constructors Constructor Description BaseRepresenter() -
Method Summary
Modifier and Type Method Description DumperOptions.FlowStylegetDefaultFlowStyle()DumperOptions.ScalarStylegetDefaultScalarStyle()PropertyUtilsgetPropertyUtils()booleanisExplicitPropertyUtils()Noderepresent(java.lang.Object data)protected NoderepresentData(java.lang.Object data)protected NoderepresentMapping(Tag tag, java.util.Map<?,?> mapping, DumperOptions.FlowStyle flowStyle)protected NoderepresentScalar(Tag tag, java.lang.String value)protected NoderepresentScalar(Tag tag, java.lang.String value, DumperOptions.ScalarStyle style)protected NoderepresentSequence(Tag tag, java.lang.Iterable<?> sequence, DumperOptions.FlowStyle flowStyle)voidsetDefaultFlowStyle(DumperOptions.FlowStyle defaultFlowStyle)voidsetDefaultScalarStyle(DumperOptions.ScalarStyle defaultStyle)voidsetPropertyUtils(PropertyUtils propertyUtils)
-
Field Details
-
representers
-
nullRepresenter
in Java 'null' is not a type. So we have to keep the null representer separately otherwise it will coincide with the default representer which is stored with the key null. -
multiRepresenters
-
defaultScalarStyle
-
defaultFlowStyle
-
representedObjects
-
objectToRepresent
protected java.lang.Object objectToRepresent
-
-
Constructor Details
-
BaseRepresenter
public BaseRepresenter()
-
-
Method Details
-
represent
-
representData
-
representScalar
-
representScalar
-
representSequence
protected Node representSequence(Tag tag, java.lang.Iterable<?> sequence, DumperOptions.FlowStyle flowStyle) -
representMapping
protected Node representMapping(Tag tag, java.util.Map<?,?> mapping, DumperOptions.FlowStyle flowStyle) -
setDefaultScalarStyle
-
getDefaultScalarStyle
-
setDefaultFlowStyle
-
getDefaultFlowStyle
-
setPropertyUtils
-
getPropertyUtils
-
isExplicitPropertyUtils
public final boolean isExplicitPropertyUtils()
-