public abstract class BaseConstructor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected LoadSettings |
settings
keep the settings
|
protected Map<org.snakeyaml.engine.v2.nodes.Tag,ConstructNode> |
tagConstructors
It maps the (explicit or implicit) tag to the Construct implementation.
|
| Constructor and Description |
|---|
BaseConstructor(LoadSettings settings)
Create
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
construct(org.snakeyaml.engine.v2.nodes.Node node)
Construct complete YAML document.
|
protected Map<Object,Object> |
constructMapping(org.snakeyaml.engine.v2.nodes.MappingNode node)
Create filled Map from the provided Node
|
protected void |
constructMapping2ndStep(org.snakeyaml.engine.v2.nodes.MappingNode node,
Map<Object,Object> mapping)
Fill the mapping with the data from provided node
|
protected Object |
constructObject(org.snakeyaml.engine.v2.nodes.Node node)
Construct object from the specified Node.
|
protected Object |
constructObjectNoCheck(org.snakeyaml.engine.v2.nodes.Node node)
Construct object from the specified Node.
|
protected String |
constructScalar(org.snakeyaml.engine.v2.nodes.ScalarNode node)
Create String from the provided scalar node
|
protected List<Object> |
constructSequence(org.snakeyaml.engine.v2.nodes.SequenceNode node)
Create instance of List
|
protected void |
constructSequenceStep2(org.snakeyaml.engine.v2.nodes.SequenceNode node,
Collection<Object> collection)
Fill the collection with the data from provided node
|
protected Set<Object> |
constructSet(org.snakeyaml.engine.v2.nodes.MappingNode node)
Create instance of Set from mapping node
|
protected void |
constructSet2ndStep(org.snakeyaml.engine.v2.nodes.MappingNode node,
Set<Object> set)
Fill the Map with the data from the node
|
Object |
constructSingleDocument(Optional<org.snakeyaml.engine.v2.nodes.Node> optionalNode)
Ensure that the stream contains a single document and construct it
|
protected List<Object> |
createEmptyListForNode(org.snakeyaml.engine.v2.nodes.SequenceNode node)
Create List implementation.
|
protected Map<Object,Object> |
createEmptyMapFor(org.snakeyaml.engine.v2.nodes.MappingNode node)
Create Map implementation.
|
protected Set<Object> |
createEmptySetForNode(org.snakeyaml.engine.v2.nodes.MappingNode node)
Create Set implementation.
|
protected Optional<ConstructNode> |
findConstructorFor(org.snakeyaml.engine.v2.nodes.Node node)
|
protected void |
postponeMapFilling(Map<Object,Object> mapping,
Object key,
Object value)
if keyObject is created it 2 steps we should postpone putting it in map because it may have
different hash after initialization compared to clean just created one.
|
protected void |
postponeSetFilling(Set<Object> set,
Object key)
if keyObject is created it 2 steps we should postpone putting it into the set because it may
have different hash after initialization compared to clean just created one.
|
protected LoadSettings settings
protected final Map<org.snakeyaml.engine.v2.nodes.Tag,ConstructNode> tagConstructors
public BaseConstructor(LoadSettings settings)
settings - - the configuration optionpublic Object constructSingleDocument(Optional<org.snakeyaml.engine.v2.nodes.Node> optionalNode)
optionalNode - - composed Nodeprotected Object construct(org.snakeyaml.engine.v2.nodes.Node node)
node - root Nodeprotected Object constructObject(org.snakeyaml.engine.v2.nodes.Node node)
node - Node to be constructedprotected Object constructObjectNoCheck(org.snakeyaml.engine.v2.nodes.Node node)
node - - the sourceprotected Optional<ConstructNode> findConstructorFor(org.snakeyaml.engine.v2.nodes.Node node)
node - Node to construct an instance fromConstructNode implementation for the specified nodeprotected String constructScalar(org.snakeyaml.engine.v2.nodes.ScalarNode node)
node - - the sourceprotected List<Object> createEmptyListForNode(org.snakeyaml.engine.v2.nodes.SequenceNode node)
node - - the node to fill the Listprotected Set<Object> createEmptySetForNode(org.snakeyaml.engine.v2.nodes.MappingNode node)
node - - the node to fill the Setprotected Map<Object,Object> createEmptyMapFor(org.snakeyaml.engine.v2.nodes.MappingNode node)
node - - the node to fill the Mapprotected List<Object> constructSequence(org.snakeyaml.engine.v2.nodes.SequenceNode node)
node - - the sourceprotected void constructSequenceStep2(org.snakeyaml.engine.v2.nodes.SequenceNode node,
Collection<Object> collection)
node - - the sourcecollection - - the collection to fillprotected Set<Object> constructSet(org.snakeyaml.engine.v2.nodes.MappingNode node)
node - - the sourceprotected Map<Object,Object> constructMapping(org.snakeyaml.engine.v2.nodes.MappingNode node)
node - - the sourceprotected void constructMapping2ndStep(org.snakeyaml.engine.v2.nodes.MappingNode node,
Map<Object,Object> mapping)
node - - the sourcemapping - - empty map to be filledprotected void postponeMapFilling(Map<Object,Object> mapping, Object key, Object value)
mapping - - the mapping to add key/valuekey - - the key to add to mapvalue - - the value behind the keyprotected void constructSet2ndStep(org.snakeyaml.engine.v2.nodes.MappingNode node,
Set<Object> set)
node - - the sourceset - - empty set to fillprotected void postponeSetFilling(Set<Object> set, Object key)
set - - the set to add the keykey - - the item to add to the setCopyright © 2018–2022. All rights reserved.