Class AbstractNodeDataWithSchema<T extends DataSchemaNode>
java.lang.Object
org.opendaylight.yangtools.yang.data.util.AbstractNodeDataWithSchema<T>
- Direct Known Subclasses:
CompositeNodeDataWithSchema
,SimpleNodeDataWithSchema
@Beta
public abstract sealed class AbstractNodeDataWithSchema<T extends DataSchemaNode>
extends Object
permits SimpleNodeDataWithSchema<T>, CompositeNodeDataWithSchema<T>
Utility abstract class for tracking parser state, as needed by 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.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
final ImmutableMap<QName,
Object> Return the associated attributes.final @NonNull T
Return the associated schema node.int
hashCode()
static @NonNull AbstractNodeDataWithSchema<?>
of
(DataSchemaNode schema) protected final YangInstanceIdentifier.NodeIdentifier
final void
setAttributes
(ImmutableMap<QName, Object> attributes) Set the associated attributes.final void
write
(NormalizedNodeStreamWriter writer) Emit this node's events into the specified writer.protected abstract void
write
(NormalizedNodeStreamWriter writer, @Nullable NormalizedNodeStreamWriter.MetadataExtension metaWriter) protected final void
-
Method Details
-
of
-
getSchema
Return the associated schema node.- Returns:
- Associated schema node.
-
setAttributes
Set the associated attributes.- Parameters:
attributes
- parsed attributes
-
getAttributes
Return the associated attributes.- Returns:
- associated attributes
-
write
Emit this node's events into the specified writer.- Parameters:
writer
- Target writer- Throws:
IOException
- reported when thrown by the writer.
-
write
protected abstract void write(NormalizedNodeStreamWriter writer, @Nullable NormalizedNodeStreamWriter.MetadataExtension metaWriter) throws IOException - Throws:
IOException
-
provideNodeIdentifier
-
writeMetadata
protected final void writeMetadata(NormalizedNodeStreamWriter.MetadataExtension metaWriter) throws IOException - Throws:
IOException
-
hashCode
public int hashCode() -
equals
-