public abstract class BaseRepresenter extends Object
Modifier and Type | Field and Description |
---|---|
protected FlowStyle |
defaultFlowStyle |
protected ScalarStyle |
defaultScalarStyle |
protected RepresentToNode |
nullRepresenter
in Java 'null' is not a type.
|
protected Object |
objectToRepresent |
protected Map<Class<?>,RepresentToNode> |
parentClassRepresenters
Keep representers which match a parent of the class to be represented
|
protected Map<Object,Node> |
representedObjects |
protected Map<Class<?>,RepresentToNode> |
representers
Keep representers which must match the class exactly
|
Constructor and Description |
---|
BaseRepresenter() |
Modifier and Type | Method and Description |
---|---|
protected Optional<RepresentToNode> |
findRepresenterFor(Object data)
Find the representer which is suitable to represent the internal structure of the provided instance to
a Node
|
Node |
represent(Object data)
Represent the provided Java instance to a Node
|
protected Node |
representData(Object data) |
protected Node |
representMapping(Tag tag,
Map<?,?> mapping,
FlowStyle flowStyle) |
protected Node |
representScalar(Tag tag,
String value) |
protected Node |
representScalar(Tag tag,
String value,
ScalarStyle style) |
protected Node |
representSequence(Tag tag,
Iterable<?> sequence,
FlowStyle flowStyle) |
protected final Map<Class<?>,RepresentToNode> representers
protected RepresentToNode nullRepresenter
protected final Map<Class<?>,RepresentToNode> parentClassRepresenters
protected ScalarStyle defaultScalarStyle
protected FlowStyle defaultFlowStyle
protected Object objectToRepresent
public Node represent(Object data)
data
- - Java instance to be representedprotected Optional<RepresentToNode> findRepresenterFor(Object data)
data
- - the data to be serializedprotected Node representScalar(Tag tag, String value, ScalarStyle style)
protected Node representSequence(Tag tag, Iterable<?> sequence, FlowStyle flowStyle)
Copyright © 2021 Hazelcast, Inc.. All rights reserved.