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 simpleStreamWriterMetadataExtension
implementation, which takes care of buildingNormalizedMetadata
based on additional nesting instructions.
-
-
Constructor Summary
Constructors Constructor Description ImmutableNormalizedMetadataStreamWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enter(YangInstanceIdentifier.PathArgument identifier)
void
exit()
Optional<NormalizedMetadata>
getResult()
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
-
-
-
-
Method Detail
-
enter
public void enter(YangInstanceIdentifier.PathArgument identifier)
-
exit
public void exit()
-
getResult
public Optional<NormalizedMetadata> getResult()
-
metadata
public void metadata(ImmutableMap<QName,Object> metadata) throws IOException
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
-
-