public abstract class BaseConstructor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Tag |
rootTag |
protected java.util.Map<NodeId,Construct> |
yamlClassConstructors
It maps the node kind to the the Construct implementation.
|
protected java.util.Map<Tag,Construct> |
yamlConstructors
It maps the (explicit or implicit) tag to the Construct implementation.
|
protected java.util.Map<java.lang.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 java.lang.Object |
constructArray(SequenceNode node) |
protected java.lang.Object |
constructArrayStep2(SequenceNode node,
java.lang.Object array) |
protected java.util.Map<java.lang.Object,java.lang.Object> |
constructMapping(MappingNode node) |
protected void |
constructMapping2ndStep(MappingNode node,
java.util.Map<java.lang.Object,java.lang.Object> mapping) |
protected java.lang.Object |
constructObject(Node node)
Construct object from the specified Node.
|
protected java.lang.Object |
constructScalar(ScalarNode node) |
protected java.util.List<? extends java.lang.Object> |
constructSequence(SequenceNode node) |
protected void |
constructSequenceStep2(SequenceNode node,
java.util.Collection<java.lang.Object> collection) |
protected java.util.Set<java.lang.Object> |
constructSet(MappingNode node) |
protected java.util.Set<? extends java.lang.Object> |
constructSet(SequenceNode node) |
protected void |
constructSet2ndStep(MappingNode node,
java.util.Set<java.lang.Object> set) |
protected <T> T[] |
createArray(java.lang.Class<T> type,
int size) |
protected java.util.List<java.lang.Object> |
createDefaultList(int initSize) |
protected java.util.Map<java.lang.Object,java.lang.Object> |
createDefaultMap() |
protected java.util.Set<java.lang.Object> |
createDefaultSet() |
protected java.util.Set<java.lang.Object> |
createDefaultSet(int initSize) |
protected Construct |
getConstructor(Node node)
Get the constructor to construct the Node.
|
java.lang.Object |
getData()
Construct and return the next document
|
PropertyUtils |
getPropertyUtils() |
java.lang.Object |
getSingleData(java.lang.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 java.util.Map<NodeId,Construct> yamlClassConstructors
protected final java.util.Map<Tag,Construct> yamlConstructors
protected final java.util.Map<java.lang.String,Construct> yamlMultiConstructors
protected Tag rootTag
public void setComposer(Composer composer)
public boolean checkData()
public java.lang.Object getData()
public java.lang.Object getSingleData(java.lang.Class<?> type)
ComposerException
- in case there are more documents in the streamprotected java.lang.Object constructObject(Node node)
node
- Node to be constructedprotected Construct getConstructor(Node node)
node
- Node to be constructedprotected java.lang.Object constructScalar(ScalarNode node)
protected java.util.List<java.lang.Object> createDefaultList(int initSize)
protected java.util.Set<java.lang.Object> createDefaultSet(int initSize)
protected <T> T[] createArray(java.lang.Class<T> type, int size)
protected java.util.List<? extends java.lang.Object> constructSequence(SequenceNode node)
protected java.util.Set<? extends java.lang.Object> constructSet(SequenceNode node)
protected java.lang.Object constructArray(SequenceNode node)
protected void constructSequenceStep2(SequenceNode node, java.util.Collection<java.lang.Object> collection)
protected java.lang.Object constructArrayStep2(SequenceNode node, java.lang.Object array)
protected java.util.Map<java.lang.Object,java.lang.Object> createDefaultMap()
protected java.util.Set<java.lang.Object> createDefaultSet()
protected java.util.Set<java.lang.Object> constructSet(MappingNode node)
protected java.util.Map<java.lang.Object,java.lang.Object> constructMapping(MappingNode node)
protected void constructMapping2ndStep(MappingNode node, java.util.Map<java.lang.Object,java.lang.Object> mapping)
protected void constructSet2ndStep(MappingNode node, java.util.Set<java.lang.Object> set)
public void setPropertyUtils(PropertyUtils propertyUtils)
public final PropertyUtils getPropertyUtils()
public final boolean isExplicitPropertyUtils()
Copyright © 2008-2013. All Rights Reserved.