Package org.yaml.snakeyaml.representer
Class BaseRepresenter
java.lang.Object
org.yaml.snakeyaml.representer.BaseRepresenter
- Direct Known Subclasses:
SafeRepresenter
Represent basic YAML structures: scalar, sequence, mapping
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DumperOptions.FlowStyle
flow style to use if not redefined.protected DumperOptions.ScalarStyle
default scalar style is PLAINprivate boolean
represent class and its children with common codeprotected Represent
in Java 'null' is not a type.protected Object
object to create the Node forprivate PropertyUtils
Keep references of already represented instancesrepresent the class without its subclasses -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongettergetterfinal PropertyUtils
getterfinal boolean
protected final Node
representData
(Object data) protected Node
representMapping
(Tag tag, Map<?, ?> mapping, DumperOptions.FlowStyle flowStyle) protected Node
representScalar
(Tag tag, String value) protected Node
representScalar
(Tag tag, String value, DumperOptions.ScalarStyle style) protected Node
representSequence
(Tag tag, Iterable<?> sequence, DumperOptions.FlowStyle flowStyle) void
setDefaultFlowStyle
(DumperOptions.FlowStyle defaultFlowStyle) void
setDefaultScalarStyle
(DumperOptions.ScalarStyle defaultStyle) void
setPropertyUtils
(PropertyUtils propertyUtils)
-
Field Details
-
representers
represent the class without its subclasses -
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
represent class and its children with common code -
defaultScalarStyle
default scalar style is PLAIN -
defaultFlowStyle
flow style to use if not redefined. -
representedObjects
Keep references of already represented instances -
objectToRepresent
object to create the Node for -
propertyUtils
-
explicitPropertyUtils
private boolean explicitPropertyUtils
-
-
Constructor Details
-
BaseRepresenter
public BaseRepresenter()
-
-
Method Details
-
represent
-
representData
-
representScalar
-
representScalar
-
representSequence
-
representMapping
-
setDefaultScalarStyle
-
getDefaultScalarStyle
getter- Returns:
- scala style
-
setDefaultFlowStyle
-
getDefaultFlowStyle
getter- Returns:
- current flow style
-
setPropertyUtils
-
getPropertyUtils
getter- Returns:
- utils or create if null
-
isExplicitPropertyUtils
public final boolean isExplicitPropertyUtils()
-