Class CompositeNodeDataWithSchema<T extends DataSchemaNode>
- java.lang.Object
-
- org.opendaylight.yangtools.yang.data.util.AbstractNodeDataWithSchema<T>
-
- org.opendaylight.yangtools.yang.data.util.CompositeNodeDataWithSchema<T>
-
- Direct Known Subclasses:
AbstractMountPointDataWithSchema
,LeafListNodeDataWithSchema
,ListNodeDataWithSchema
,YangModeledAnyXmlNodeDataWithSchema
public class CompositeNodeDataWithSchema<T extends DataSchemaNode> extends AbstractNodeDataWithSchema<T>
Utility class used for tracking parser state as needed by a StAX-like parser. This class is to be used only by respective XML and JSON parsers in yang-data-codec-xml and yang-data-codec-gson.Represents a node which is composed of multiple simpler nodes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompositeNodeDataWithSchema.ChildReusePolicy
Policy on how child nodes should be treated when an attempt is made to add them multiple times.
-
Constructor Summary
Constructors Constructor Description CompositeNodeDataWithSchema(T schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractNodeDataWithSchema<?>
addChild(Deque<DataSchemaNode> schemas, CompositeNodeDataWithSchema.ChildReusePolicy policy)
protected int
childSizeHint()
Return a hint about how may children we are going to generate.void
write(NormalizedNodeStreamWriter writer, StreamWriterMetadataExtension metaWriter)
-
Methods inherited from class org.opendaylight.yangtools.yang.data.util.AbstractNodeDataWithSchema
equals, getAttributes, getSchema, hashCode, provideNodeIdentifier, setAttributes, write, writeMetadata
-
-
-
-
Constructor Detail
-
CompositeNodeDataWithSchema
public CompositeNodeDataWithSchema(T schema)
-
-
Method Detail
-
addChild
public final AbstractNodeDataWithSchema<?> addChild(Deque<DataSchemaNode> schemas, CompositeNodeDataWithSchema.ChildReusePolicy policy)
-
childSizeHint
protected final int childSizeHint()
Return a hint about how may children we are going to generate.- Returns:
- Size of currently-present node list.
-
write
public void write(NormalizedNodeStreamWriter writer, StreamWriterMetadataExtension metaWriter) throws IOException
- Specified by:
write
in classAbstractNodeDataWithSchema<T extends DataSchemaNode>
- Throws:
IOException
-
-