Class ImmutableNormalizedMetadataStreamWriter
java.lang.Object
org.opendaylight.yangtools.rfc7952.data.util.ImmutableNormalizedMetadataStreamWriter
- All Implemented Interfaces:
ObjectExtension<NormalizedNodeStreamWriter,
,NormalizedNodeStreamWriterExtension> StreamWriterMetadataExtension
,NormalizedNodeStreamWriterExtension
@Beta
public final class ImmutableNormalizedMetadataStreamWriter
extends Object
implements StreamWriterMetadataExtension
A simple
StreamWriterMetadataExtension
implementation, which takes care of building
NormalizedMetadata
based on additional nesting instructions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
enter
(YangInstanceIdentifier.PathArgument identifier) void
exit()
void
metadata
(ImmutableMap<QName, Object> metadata) Emit a block of metadata associated with the currently-open node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.rfc7952.data.api.StreamWriterMetadataExtension
requireMetadataFirst
-
Constructor Details
-
ImmutableNormalizedMetadataStreamWriter
public ImmutableNormalizedMetadataStreamWriter()
-
-
Method Details
-
enter
-
exit
public void exit() -
getResult
-
metadata
Description copied from interface:StreamWriterMetadataExtension
Emit a block of metadata associated with the currently-open node. The argument is a map of annotation names, as definedmd:annotation
extension. Values are normalized objects, which are required to be effectively-immutable.- Specified by:
metadata
in interfaceStreamWriterMetadataExtension
- Parameters:
metadata
- Metadata block- Throws:
IOException
- if an underlying IO error occurs
-