public abstract class BaseConstructor extends Object
Modifier and Type | Field and Description |
---|---|
protected Composer |
composer |
protected Tag |
rootTag |
protected Map<NodeId,Construct> |
yamlClassConstructors
It maps the node kind to the the Construct implementation.
|
protected Map<Tag,Construct> |
yamlConstructors
It maps the (explicit or implicit) tag to the Construct implementation.
|
protected Map<String,Construct> |
yamlMultiConstructors
It maps the (explicit or implicit) tag to the Construct implementation.
|
Constructor and Description |
---|
BaseConstructor() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkData()
Check if more documents available
|
protected Object |
constructArray(SequenceNode node) |
protected Object |
constructArrayStep2(SequenceNode node,
Object array) |
protected Object |
constructDocument(Node node)
Construct complete YAML document.
|
protected Map<Object,Object> |
constructMapping(MappingNode node) |
protected void |
constructMapping2ndStep(MappingNode node,
Map<Object,Object> mapping) |
protected Object |
constructObject(Node node)
Construct object from the specified Node.
|
protected Object |
constructScalar(ScalarNode node) |
protected List<? extends Object> |
constructSequence(SequenceNode node) |
protected void |
constructSequenceStep2(SequenceNode node,
Collection<Object> collection) |
protected Set<Object> |
constructSet(MappingNode node) |
protected Set<? extends Object> |
constructSet(SequenceNode node) |
protected void |
constructSet2ndStep(MappingNode node,
Set<Object> set) |
protected Object |
createArray(Class<?> type,
int size) |
protected List<Object> |
createDefaultList(int initSize) |
protected Map<Object,Object> |
createDefaultMap() |
protected Set<Object> |
createDefaultSet() |
protected Set<Object> |
createDefaultSet(int initSize) |
protected Construct |
getConstructor(Node node)
Get the constructor to construct the Node.
|
Object |
getData()
Construct and return the next document
|
PropertyUtils |
getPropertyUtils() |
Object |
getSingleData(Class<?> type)
Ensure that the stream contains a single document and construct it
|
boolean |
isExplicitPropertyUtils() |
void |
setComposer(Composer composer) |
void |
setPropertyUtils(PropertyUtils propertyUtils) |
protected final Map<NodeId,Construct> yamlClassConstructors
protected final Map<Tag,Construct> yamlConstructors
protected final Map<String,Construct> yamlMultiConstructors
protected Composer composer
protected Tag rootTag
public void setComposer(Composer composer)
public boolean checkData()
public Object getData()
public Object getSingleData(Class<?> type)
ComposerException
- in case there are more documents in the streamprotected final Object constructDocument(Node node)
node
- root Nodeprotected Object constructObject(Node node)
node
- Node to be constructedprotected Construct getConstructor(Node node)
node
- Node to be constructedprotected Object constructScalar(ScalarNode node)
protected List<? extends Object> constructSequence(SequenceNode node)
protected Set<? extends Object> constructSet(SequenceNode node)
protected Object constructArray(SequenceNode node)
protected void constructSequenceStep2(SequenceNode node, Collection<Object> collection)
protected Object constructArrayStep2(SequenceNode node, Object array)
protected Set<Object> constructSet(MappingNode node)
protected Map<Object,Object> constructMapping(MappingNode node)
protected void constructMapping2ndStep(MappingNode node, Map<Object,Object> mapping)
protected void constructSet2ndStep(MappingNode node, Set<Object> set)
public void setPropertyUtils(PropertyUtils propertyUtils)
public final PropertyUtils getPropertyUtils()
public final boolean isExplicitPropertyUtils()
Copyright © 2008–2016. All rights reserved.