public abstract class BaseRepresenter extends Object
Modifier and Type | Field and Description |
---|---|
protected DumperOptions.FlowStyle |
defaultFlowStyle
flow style to use if not redefined.
|
protected DumperOptions.ScalarStyle |
defaultScalarStyle
default scalar style is not defined
|
protected Map<Class<?>,Represent> |
multiRepresenters
represent class and its children with common code
|
protected Represent |
nullRepresenter
in Java 'null' is not a type.
|
protected Object |
objectToRepresent
object to create the Node for
|
protected Map<Object,Node> |
representedObjects
Keep references of already represented instances
|
protected Map<Class<?>,Represent> |
representers
represent the class without its subclasses
|
Constructor and Description |
---|
BaseRepresenter() |
Modifier and Type | Method and Description |
---|---|
DumperOptions.FlowStyle |
getDefaultFlowStyle()
getter
|
DumperOptions.ScalarStyle |
getDefaultScalarStyle()
getter
|
PropertyUtils |
getPropertyUtils()
getter
|
boolean |
isExplicitPropertyUtils() |
Node |
represent(Object data) |
protected 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) |
protected final Map<Class<?>,Represent> representers
protected Represent nullRepresenter
protected final Map<Class<?>,Represent> multiRepresenters
protected DumperOptions.ScalarStyle defaultScalarStyle
protected DumperOptions.FlowStyle defaultFlowStyle
protected final Map<Object,Node> representedObjects
protected Object objectToRepresent
protected Node representScalar(Tag tag, String value, DumperOptions.ScalarStyle style)
protected Node representSequence(Tag tag, Iterable<?> sequence, DumperOptions.FlowStyle flowStyle)
protected Node representMapping(Tag tag, Map<?,?> mapping, DumperOptions.FlowStyle flowStyle)
public void setDefaultScalarStyle(DumperOptions.ScalarStyle defaultStyle)
public DumperOptions.ScalarStyle getDefaultScalarStyle()
public void setDefaultFlowStyle(DumperOptions.FlowStyle defaultFlowStyle)
public DumperOptions.FlowStyle getDefaultFlowStyle()
public void setPropertyUtils(PropertyUtils propertyUtils)
public final PropertyUtils getPropertyUtils()
public final boolean isExplicitPropertyUtils()
Copyright © 2008–2022. All rights reserved.