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
public sealed class CompositeNodeDataWithSchema<T extends DataSchemaNode>
extends AbstractNodeDataWithSchema<T>
permits AbstractMountPointDataWithSchema<T>, LeafListNodeDataWithSchema, ListNodeDataWithSchema (not exhaustive)
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 ClassesModifier and TypeClassDescriptionstatic enum
Policy on how child nodes should be treated when an attempt is made to add them multiple times. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AbstractNodeDataWithSchema<?>
addChild
(Deque<DataSchemaNode> schemas, CompositeNodeDataWithSchema.ChildReusePolicy policy) protected final int
Return a hint about how may children we are going to generate.static @NonNull CompositeNodeDataWithSchema<?>
of
(DataSchemaNode schema) void
write
(NormalizedNodeStreamWriter writer, NormalizedNodeStreamWriter.MetadataExtension metaWriter) Methods inherited from class org.opendaylight.yangtools.yang.data.util.AbstractNodeDataWithSchema
equals, getAttributes, getSchema, hashCode, provideNodeIdentifier, setAttributes, write, writeMetadata
-
Constructor Details
-
CompositeNodeDataWithSchema
-
-
Method Details
-
of
-
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, NormalizedNodeStreamWriter.MetadataExtension metaWriter) throws IOException - Specified by:
write
in classAbstractNodeDataWithSchema<T extends DataSchemaNode>
- Throws:
IOException
-