Search in sources :

Example 1 with BindingCodecTree

use of org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree in project controller by opendaylight.

the class BindingToNormalizedNodeCodec method getSubtreeCodec.

@Nonnull
public Map.Entry<InstanceIdentifier<?>, BindingCodecTreeNode<?>> getSubtreeCodec(final YangInstanceIdentifier domIdentifier) {
    final BindingCodecTree currentCodecTree = this.codecRegistry.getCodecContext();
    final InstanceIdentifier<?> bindingPath = this.codecRegistry.fromYangInstanceIdentifier(domIdentifier);
    Preconditions.checkArgument(bindingPath != null);
    /**
     * If we are able to deserialize YANG instance identifier, getSubtreeCodec must
     * return non-null value.
     */
    final BindingCodecTreeNode<?> codecContext = currentCodecTree.getSubtreeCodec(bindingPath);
    return new SimpleEntry<>(bindingPath, codecContext);
}
Also used : SimpleEntry(java.util.AbstractMap.SimpleEntry) BindingCodecTree(org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree) Nonnull(javax.annotation.Nonnull)

Aggregations

SimpleEntry (java.util.AbstractMap.SimpleEntry)1 Nonnull (javax.annotation.Nonnull)1 BindingCodecTree (org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree)1