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);
}
Aggregations