Class ImmutableMetadataExtension
java.lang.Object
org.opendaylight.yangtools.yang.data.impl.schema.ImmutableMetadataExtension
- All Implemented Interfaces:
ObjectExtension<NormalizedNodeStreamWriter,
,NormalizedNodeStreamWriter.Extension> NormalizedNodeStreamWriter.Extension
,NormalizedNodeStreamWriter.MetadataExtension
@Beta
public final class ImmutableMetadataExtension
extends Object
implements NormalizedNodeStreamWriter.MetadataExtension
A simple
NormalizedNodeStreamWriter.MetadataExtension
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.yang.data.api.schema.stream.NormalizedNodeStreamWriter.MetadataExtension
requireMetadataFirst
-
Constructor Details
-
ImmutableMetadataExtension
public ImmutableMetadataExtension()
-
-
Method Details
-
enter
-
exit
public void exit() -
getResult
-
metadata
Description copied from interface:NormalizedNodeStreamWriter.MetadataExtension
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 interfaceNormalizedNodeStreamWriter.MetadataExtension
- Parameters:
metadata
- Metadata block- Throws:
IOException
- if an underlying IO error occurs
-