Package org.yaml.snakeyaml.representer
Class BaseRepresenter
java.lang.Object
org.yaml.snakeyaml.representer.BaseRepresenter
- Direct Known Subclasses:
Representer
Represent basic YAML structures: scalar, sequence, mapping
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DumperOptions.FlowStyleflow style to use if not redefined.protected DumperOptions.ScalarStyledefault scalar style is not definedrepresent class and its children with common codeprotected Representin Java 'null' is not a type.protected Objectobject to create the Node forKeep references of already represented instancesrepresent the class without its subclasses -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongettergetterfinal PropertyUtilsgetterfinal booleanprotected final 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 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 not defined -
defaultFlowStyle
flow style to use if not redefined. -
representedObjects
Keep references of already represented instances -
objectToRepresent
object to create the Node for
-
-
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()
-