Package org.yaml.snakeyaml.representer
Class BaseRepresenter
- java.lang.Object
-
- org.yaml.snakeyaml.representer.BaseRepresenter
-
- Direct Known Subclasses:
Representer
public abstract class BaseRepresenter extends Object
Represent basic YAML structures: scalar, sequence, mapping
-
-
Field Summary
Fields Modifier and Type Field Description protected DumperOptions.FlowStyledefaultFlowStyleprotected DumperOptions.ScalarStyledefaultScalarStyleprotected Map<Class<?>,Represent>multiRepresentersprotected RepresentnullRepresenterin Java 'null' is not a type.protected ObjectobjectToRepresentprotected Map<Object,Node>representedObjectsprotected Map<Class<?>,Represent>representers
-
Constructor Summary
Constructors Constructor Description BaseRepresenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DumperOptions.FlowStylegetDefaultFlowStyle()DumperOptions.ScalarStylegetDefaultScalarStyle()PropertyUtilsgetPropertyUtils()booleanisExplicitPropertyUtils()Noderepresent(Object data)protected NoderepresentData(Object data)protected NoderepresentMapping(Tag tag, Map<?,?> mapping, DumperOptions.FlowStyle flowStyle)protected NoderepresentScalar(Tag tag, String value)protected NoderepresentScalar(Tag tag, String value, DumperOptions.ScalarStyle style)protected NoderepresentSequence(Tag tag, Iterable<?> sequence, DumperOptions.FlowStyle flowStyle)voidsetDefaultFlowStyle(DumperOptions.FlowStyle defaultFlowStyle)voidsetDefaultScalarStyle(DumperOptions.ScalarStyle defaultStyle)voidsetPropertyUtils(PropertyUtils propertyUtils)
-
-
-
Field Detail
-
nullRepresenter
protected Represent 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.
-
defaultScalarStyle
protected DumperOptions.ScalarStyle defaultScalarStyle
-
defaultFlowStyle
protected DumperOptions.FlowStyle defaultFlowStyle
-
objectToRepresent
protected Object objectToRepresent
-
-
Method Detail
-
representScalar
protected Node representScalar(Tag tag, String value, DumperOptions.ScalarStyle style)
-
representSequence
protected Node representSequence(Tag tag, Iterable<?> sequence, DumperOptions.FlowStyle flowStyle)
-
representMapping
protected Node representMapping(Tag tag, Map<?,?> mapping, DumperOptions.FlowStyle flowStyle)
-
setDefaultScalarStyle
public void setDefaultScalarStyle(DumperOptions.ScalarStyle defaultStyle)
-
getDefaultScalarStyle
public DumperOptions.ScalarStyle getDefaultScalarStyle()
-
setDefaultFlowStyle
public void setDefaultFlowStyle(DumperOptions.FlowStyle defaultFlowStyle)
-
getDefaultFlowStyle
public DumperOptions.FlowStyle getDefaultFlowStyle()
-
setPropertyUtils
public void setPropertyUtils(PropertyUtils propertyUtils)
-
getPropertyUtils
public final PropertyUtils getPropertyUtils()
-
isExplicitPropertyUtils
public final boolean isExplicitPropertyUtils()
-
-